Skip to content

Commit 3780ec4

Browse files
authored
Ignore stderr for validate and summary commands (#1151)
We still log stderr, but don't pass it down to the callers, as it will mess up json parsing. If the command fails with non zero status we also fail, but the presence of stderr is not an indicator of failure in this case.
1 parent 2cff68e commit 3780ec4

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

packages/databricks-vscode/src/cli/CliWrapper.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -288,13 +288,11 @@ export class CliWrapper {
288288
},
289289
shell: true,
290290
});
291-
const output = stdout + stderr;
292-
293291
logger?.info("Finished reading local bundle configuration.", {
294292
bundleOpName: "validate",
295293
});
296-
logger?.debug(output);
297-
return output;
294+
logger?.debug(stdout + stderr);
295+
return stdout;
298296
} catch (e: any) {
299297
logger?.error(
300298
`Failed to read local bundle configuration. ${e.message ?? ""}`,
@@ -335,13 +333,11 @@ export class CliWrapper {
335333
},
336334
shell: true,
337335
});
338-
339-
const output = stdout + stderr;
340336
logger?.info("Bundle configuration refreshed.", {
341337
bundleOpName: "summarize",
342338
});
343-
logger?.debug(output);
344-
return output;
339+
logger?.debug(stdout + stderr);
340+
return stdout;
345341
} catch (e: any) {
346342
logger?.error(
347343
`Failed to refresh bundle configuration. ${e.message ?? ""}`,

0 commit comments

Comments
 (0)