Skip to content

Commit

Permalink
chore: possible fix for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
zone117x committed Feb 4, 2025
1 parent 09ac1e1 commit e63605c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/commands/deploy-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ only the raw transaction hex will be logged.

async getContractCode(contract: Contract) {
if (contract === 'memo-expected') return '(print "ok")';
return fs.readFile(`./contracts/${contract}.clar`, 'utf8');
let contractSrc = await fs.readFile(`./contracts/${contract}.clar`, 'utf8');
// replace Windows newlines with LF
contractSrc = contractSrc.replaceAll('\r\n', '\n');
return contractSrc;
}

getNetwork(flags: { network: string }) {
Expand Down

0 comments on commit e63605c

Please sign in to comment.