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

detox build -c does not return error exit code when build fails #3938

Closed
1 task done
leoylung opened this issue Feb 16, 2023 · 1 comment
Closed
1 task done

detox build -c does not return error exit code when build fails #3938

leoylung opened this issue Feb 16, 2023 · 1 comment

Comments

@leoylung
Copy link

What happened?

        'android.foobar': {
            type: 'android.apk',
            binaryPath:
                'android/app/...',
            testBinaryPath:
                'android/app/...',
            build:
                'cd android ; ./gradlew ...; cd -',
        },
    },

    configurations: {
        'android.emu.foobar': {
            device: 'android.emulator',
            app: 'android.foobar',
        },
    },
detox build -c android.emu.foobar

Above command does not exit with an error code when the gradew build step fails. This makes it difficult for CI environments to identify which step failed. Often, the build step would appear to succeed, and we get a file not found in the next step.

What was the expected behaviour?

detox build -c exits with error code from build step.

Was it tested on latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Help us reproduce this issue!

No response

In what environment did this happen?

Detox version:
React Native version:
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version:
Test-runner (select one): jest / other

Detox logs

Detox logs
paste logs here!

Device logs

Device logs
paste logs here!

More data, please!

No response

@noomorph
Copy link
Collaborator

You should fix your build command then – use &&, not ;:

What is the difference between double-ampersand (&&) and semicolon (;) in Linux Bash?

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

No branches or pull requests

2 participants