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

When the build.ignore command or script is not found, log this to the build logs. #357

Open
overlordofmu opened this issue Dec 6, 2019 · 0 comments

Comments

@overlordofmu
Copy link

@overlordofmu overlordofmu commented Dec 6, 2019

Description

If you reference a build.ignore which is invalid or doesn't exist the failure is silently ignored and the build continues.

I was testing with a bash script named exit-zero.sh:

#!/bin/bash

exit 0

If I reference this in build.ignore as ./exit-zero.sh the script runs, exits with zero and the build is cancelled:

11:59:22 PM: Canceled build due to no content change
11:59:22 PM: Detected ignore command in Netlify configuration file. Proceeding with the specified command: './exit-zero.sh'
11:59:22 PM: User-specified ignore command returned exit code 0. Returning early from build.

However, if I don't reference this from the current directory it isn't in the shell's path so cannot be run at all. However, the logging makes it look no different than any other non-zero exit:

12:57:42 AM: Detected ignore command in Netlify configuration file. Proceeding with the specified command: 'exit-zero.sh'
12:57:42 AM: No build command found, continuing to publishing
12:57:42 AM: Starting to deploy site from '/'

Solution I would like

Ideally, the build would still continue (as this should be the default I believe) but we would log the missing command or script. For example:

12:57:42 AM: Detected ignore command in Netlify configuration file. Proceeding with the specified command: 'exit-zero.sh'
12:57:42 AM: exit-zero.sh: command not found
12:57:42 AM: No build command found, continuing to publishing
12:57:42 AM: Starting to deploy site from '/'

Other notes

This could be a simple as filtering for "command not found" and logging if that string is in the output for the build.ignore attempt.

Follow-up

Notify here:

https://community.netlify.com/t/custom-build-ignore-script-exit-code-bug/5627/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.