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

spawn error #172

Open
kkm opened this issue Feb 13, 2023 · 1 comment
Open

spawn error #172

kkm opened this issue Feb 13, 2023 · 1 comment

Comments

@kkm
Copy link

kkm commented Feb 13, 2023

I am not sure that is bug.
image

example script:

#!/usr/bin/env node
const args = require('args')

args
  .option('port', 'The port on which the app will be running', 3000)
  .option('reload', 'Enable/disable livereloading')
  .command('serve', 'Serve your static site', ['s'])

const flags = args.parse(process.argv)

node app serve

@rjborba
Copy link

rjborba commented Oct 12, 2023

Pretty late for the party, but with hope that it will help others.

If you want the command to execute some method, you can also pass this init object in the options:

args
  .option("channelId", "The channel ID the threads will be fetched from")
  .command(
    "fetch",
    "Fetch threads from a given channelId",
    () => {
      console.log("I was used!");
    },
    ["f"]
  );

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

2 participants