fix(cli): mention remote daemon host on ls connect failure (#1043)
This commit is contained in:
@@ -178,7 +178,8 @@ export async function runLsCommand(
|
||||
const error: CommandError = {
|
||||
code: "DAEMON_NOT_RUNNING",
|
||||
message: `Cannot connect to daemon at ${host}: ${message}`,
|
||||
details: "Start the daemon with: paseo daemon start",
|
||||
details:
|
||||
"Start the daemon with: paseo daemon start\nFor a remote daemon, pass --host <host:port> or set PASEO_HOST.",
|
||||
};
|
||||
throw error;
|
||||
}
|
||||
|
||||
@@ -70,6 +70,8 @@ try {
|
||||
output.toLowerCase().includes("connect") ||
|
||||
output.toLowerCase().includes("cannot");
|
||||
assert(hasError, "error message should mention connection issue");
|
||||
assert(output.includes("--host <host:port>"), "error message should mention --host");
|
||||
assert(output.includes("PASEO_HOST"), "error message should mention PASEO_HOST");
|
||||
console.log("✓ paseo ls handles daemon not running\n");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user