Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_scripts.js deploy task won't accept --tags #11

Open
mb-swirlds opened this issue Mar 23, 2023 · 0 comments
Open

_scripts.js deploy task won't accept --tags #11

mb-swirlds opened this issue Mar 23, 2023 · 0 comments

Comments

@mb-swirlds
Copy link

Been trying to pass in some tags to the deploy task in this package but the args never come through as I expect.

❯ npm run deploy localhost --tags NFT1

will fail. the --tags will disappear.

I'm running ZSH and antigen on OSX but I can see the args coming in:

else if (firstArg === 'deploy') {
    const {fixedArgs, extra} = parseArgs(args, 1, {});
    console.log('performAction: ', { fixedArgs, extra, args, actual: process.argv })
    await execute(`hardhat --network ${fixedArgs[0]} deploy --report-gas ${extra.join(' ')}`);
  }

when I run I see this:

❯ npm run deploy localhost --tags NFT1

> [email protected] deploy
> node ./_scripts.js deploy localhost NFT1

performAction:  {
  fixedArgs: [ 'localhost' ],
  extra: [ 'NFT1' ],
  args: [ 'localhost', 'NFT1' ],
  actual: [
    '/Users/user/.nvm/versions/node/v18.15.0/bin/node',
    '/Users/user/dev/hedera-hardhat/_scripts.js',
    'deploy',
    'localhost',
    'NFT1'
  ]
}
loading private keys:  { networkName: 'testnet', privateKeysFound: 1 }
loading private keys:  { networkName: 'DEFAULT', privateKeysFound: 4 }
Error HH308: Unrecognized positional argument NFT1
// failure

It appears the --param parts are being ripped out/removed. Any idea why/where? It looks like NPM is swallowing it for some reason.

When I do the call using npx hardhat --network localhost deploy --tags NFT1 its fine.

Just via the script call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant