Skip to content

Commit

Permalink
fix(create-agoric-cli): don't follow symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Aug 28, 2020
1 parent 1bae122 commit 26e02ae
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/create-agoric-cli.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@ try {
# Always execute the checked-out Agoric CLI with the --sdk flag.
exec ${cli} --sdk \${1+"\$@"}
`;

console.log(`creating ${script}`);
try {
// Unlink the old version in case it's a symlink.
fs.unlinkSync(script);
} catch (e) {
// do nothing.
}

fs.writeFileSync(script, content);
fs.chmodSync(script, '0755');
} catch (err) {
Expand Down

0 comments on commit 26e02ae

Please sign in to comment.