Skip to content

Commit

Permalink
fix: don't overwrite existing files with link-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Nov 6, 2020
1 parent 9c29e10 commit 008b058
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/create-agoric-cli.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ exec ${cli} \$opts \${1+"\$@"}
`;

console.log(`creating ${script}`);
if (fs.existsSync(script)) {
throw Error(`${script} must not already exist; you should use a fresh path.`);
}
try {
// Unlink the old version in case it's a symlink.
fs.unlinkSync(script);
Expand Down

0 comments on commit 008b058

Please sign in to comment.