Skip to content

Commit

Permalink
fix(ci): terminal required workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
gibbz00 committed Aug 16, 2024
1 parent 86ee227 commit 832d586
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
runs-on: ubuntu-latest
env:
PROJECT_NAME: basic-tests
CARGO_GENERATE_VALUE_CI: true
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand Down
7 changes: 7 additions & 0 deletions cargo_generate_hooks/init.rhai
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// WORKAROUND:
// CI will otherwise fail with a `Runtime error: IO error: not a terminal`,
// even when returning early for predefined values.
if variable::is_set("CI") {
exit();
}

template_book();
template_precommit_hooks();
prompt_optional_string("codecov", "Codecov token");
Expand Down

0 comments on commit 832d586

Please sign in to comment.