Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
Print Starknet version in --version (#906)
Browse files Browse the repository at this point in the history
  • Loading branch information
swapnilraj authored Feb 8, 2023
1 parent 872a727 commit dd87412
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,5 +536,16 @@ program
.action(() => {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const pjson = require('../package.json');

const cairoInstallScript = fs
.readFileSync(path.join(__dirname, '..', 'warp_venv.sh'))
.toString();

const starknetVersion: string = (cairoInstallScript.match(/cairo-lang==(.*)/) || [])[1];

console.log(blue(`Warp Version `) + green(pjson.version));

if (starknetVersion !== undefined) {
console.log(blue(`Starknet Version `) + green(starknetVersion));
}
});

0 comments on commit dd87412

Please sign in to comment.