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

[Question] Having trouble using foy #22

Closed
JUSTIVE opened this issue Jun 23, 2024 · 4 comments
Closed

[Question] Having trouble using foy #22

JUSTIVE opened this issue Jun 23, 2024 · 4 comments

Comments

@JUSTIVE
Copy link

JUSTIVE commented Jun 23, 2024

Hi, I'm trying to use this library, but I'm having trouble with it.
even with the basic example that Foy init gives, it does not work at all, which is

const { task, desc, option, fs } = require('foy')

  task('build', async ctx => {
    await ctx.exec('echo "hello world"')
  })

and does not print at all. tried changing command to something simple, also does not work at all.
Am I missing something here?

for more information, I'm using node@20.

@zaaack
Copy link
Owner

zaaack commented Jul 6, 2024

@JUSTIVE Plz try this and run npx foy build again:

const { task, desc, option, fs,setGlobalOptions } = require('foy')
setGlobalOptions({ loading: false })
  task('build', async ctx => {
    await ctx.exec('echo "hello world"')
  })

@zaaack
Copy link
Owner

zaaack commented Jul 9, 2024

do you use windows?

@JUSTIVE
Copy link
Author

JUSTIVE commented Jul 13, 2024

@JUSTIVE Plz try this and run npx foy build again:

const { task, desc, option, fs,setGlobalOptions } = require('foy')
setGlobalOptions({ loading: false })
  task('build', async ctx => {
    await ctx.exec('echo "hello world"')
  })

still same, without any stdout prints. I'm using mac(apple silicon).
tried on node, and also bun, same outputs.

@JUSTIVE
Copy link
Author

JUSTIVE commented Sep 9, 2024

figured out how it works. I had to pass another 'build' to execute properly.
bun ./index.ts build was the solution I needed.

@JUSTIVE JUSTIVE closed this as completed Sep 9, 2024
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