Skip to content

Commit

Permalink
fix(ag-solo): don't require a git checkout to init
Browse files Browse the repository at this point in the history
Fixes #570, fixes #562
  • Loading branch information
michaelfig committed Feb 26, 2020
1 parent f755266 commit b8c4474
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/cosmic-swingset/lib/ag-solo/init-basedir.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@ export default function initBasedir(
try {
fs.copyFileSync(path.join(`${here}/..`, gr), path.join(dest_htmldir, gr));
} catch (e) {
const stdout = execFileSync('git', ['describe', '--always', '--dirty']);
fs.writeFileSync(path.join(dest_htmldir, gr), stdout);
let revision;
try {
// Don't allow git to fail.
revision = execFileSync('git', ['describe', '--always', '--dirty']);
} catch (_e) {
revision = 'unknown\n';
}
fs.writeFileSync(path.join(dest_htmldir, gr), revision);
}

const source_vatdir = subdir
Expand Down

0 comments on commit b8c4474

Please sign in to comment.