Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--version suppresses child stderr when checking git repo #61

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export function getRevision(root: /* ImportMeta.URL */ string) {
let changes = "";
try {
// Are there any outstanding git changes?
const run = (cmd: string) => execSync(cmd, { encoding: "utf-8", cwd });
const run = (cmd: string) =>
execSync(cmd, { encoding: "utf-8", cwd, stdio: "pipe" });
sha = run("git rev-parse --short HEAD").trim();
status = run("git status --porcelain=v1");
} catch (e) {}
Expand Down