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

build command throws ENOENT #1194

Closed
zanona opened this issue Sep 2, 2020 · 5 comments
Closed

build command throws ENOENT #1194

zanona opened this issue Sep 2, 2020 · 5 comments
Labels
area: command: build status: unconfirmed type: bug code to address defects in shipped code

Comments

@zanona
Copy link

zanona commented Sep 2, 2020

Is bash necessary for executing the build command?

$ netlify  build --context=development --debug

┌─────────────────────────────┐
│        Netlify Build        │
└─────────────────────────────┘
​
❯ Version
  @netlify/build 3.3.5
​
❯ Flags
  mode: cli
​
❯ Current directory
  /mnt/app
​
❯ Config file
  /mnt/app/netlify.toml
​
❯ Context
  development
​
┌────────────────────────────────────┐
│ 1. build.command from netlify.toml │
└────────────────────────────────────┘
​
$ echo testCommand


┌─────────────────────────────┐
│   "build.command" failed    │
└─────────────────────────────┘
​
  Error message
  Command failed with ENOENT: echo testCommand
  spawn bash ENOENT
​
  Error location
  In build.command from netlify.toml:
  echo testCommand
​
  Resolved config
  build:
    command: echo testCommand
    commandOrigin: config
    environment: ...

Expected:

await runBuildCommand(t, builder.directory, { output: 'testCommand' })

@erezrokah erezrokah added type: bug code to address defects in shipped code area: command: build status: unconfirmed labels Sep 2, 2020
@erezrokah
Copy link
Contributor

Hi @zanona, can you please follow the issue template? That would make it easier for us to reproduce locally.

@zanona
Copy link
Author

zanona commented Sep 2, 2020

Sorry, not sure what happened, but when opening I didn't get the template, I opened by referencing a line of code directly.
Closing in favour of: netlify/build@dab2ef8#r41971893

@ehmicky
Copy link
Contributor

ehmicky commented Sep 2, 2020

Hi @zanona,

Bash has been used for many years to run Netlify Build commands. The reason it is currently used is to maintain backward compatibility with Build commands that use Bash-specific syntax.

@zanona
Copy link
Author

zanona commented Sep 2, 2020

Hi @zanona,

Bash has been used for many years to run Netlify Build commands. The reason it is currently used is to maintain backward compatibility with Build commands that use Bash-specific syntax.

Thanks for clarifying, @ehmicky.
I have now added bash as a dependency to my docker container.

@mikr13
Copy link

mikr13 commented Sep 28, 2021

Thanks @ehmicky this helped

Hi @zanona,

Bash has been used for many years to run Netlify Build commands. The reason it is currently used is to maintain backward compatibility with Build commands that use Bash-specific syntax.

Thanks @ehmicky this helped a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: command: build status: unconfirmed type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

4 participants