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

Use cargo-binstall as fallback in main.sh #8

Merged
merged 26 commits into from
Jun 10, 2022

Conversation

NobodyXu
Copy link
Collaborator

Fixed #7

Signed-off-by: Jiahao XU Jiahao_XU@outlook.com

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
instead of `wget`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Copy link
Owner

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

main.sh Outdated Show resolved Hide resolved
main.sh Outdated Show resolved Hide resolved
main.sh Show resolved Hide resolved
main.sh Outdated Show resolved Hide resolved
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
main.sh Show resolved Hide resolved
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@NobodyXu
Copy link
Collaborator Author

NobodyXu commented Jun 8, 2022

@taiki-e I am clueless at what cause the error in the CI.

Can you help me with the error?

main.sh Outdated Show resolved Hide resolved
main.sh Outdated Show resolved Hide resolved
main.sh Outdated Show resolved Hide resolved
main.sh Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
NobodyXu and others added 4 commits June 9, 2022 01:21
Co-authored-by: Taiki Endo <te316e89@gmail.com>
Co-authored-by: Taiki Endo <te316e89@gmail.com>
which is well maintained.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@NobodyXu
Copy link
Collaborator Author

NobodyXu commented Jun 8, 2022

@taiki-e I am really confused at the err msg:

Debugging
total 9976
   0 drwxr-xr-x  16 runner  staff   512B Jun  8 15:31 .
   0 drwxr-xr-x   3 runner  staff    96B Jun  8 15:31 ..
   8 -rw-r--r--   1 runner  staff   331B Jun  8 15:31 .editorconfig
   0 drwxr-xr-x  13 runner  staff   416B Jun  8 15:31 .git
   8 -rw-r--r--   1 runner  staff    19B Jun  8 15:31 .gitattributes
   0 drwxr-xr-x   3 runner  staff    96B Jun  8 15:31 .github
   8 -rw-r--r--   1 runner  staff   277B Jun  8 15:31 .gitignore
  16 -rw-r--r--   1 runner  staff   5.2K Jun  8 15:31 CHANGELOG.md
  24 -rw-r--r--   1 runner  staff   9.9K Jun  8 15:31 LICENSE-APACHE
   8 -rw-r--r--   1 runner  staff   1.0K Jun  8 15:31 LICENSE-MIT
  16 -rw-r--r--   1 runner  staff   6.4K Jun  8 15:31 README.md
   8 -rw-r--r--   1 runner  staff   253B Jun  8 15:31 action.yml
9848 -rwxr-xr-x   1 runner  staff   4.8M Jun  8 05:26 cargo-binstall
   8 -rw-r--r--   1 runner  staff   335B Jun  8 15:31 main.js
  24 -rwxr-xr-x   1 runner  staff    11K Jun  8 15:31 main.sh
   0 drwxr-xr-x   4 runner  staff   128B Jun  8 15:31 tools
mv: rename cargo-binstall to ~/.cargo/bin: No such file or directory
Error: Command failed: bash --noprofile --norc /Users/runner/work/install-action/install-action/main.sh

Clearly cargo-binstall is extracted correctly and the mv also seems to be valid for linux and macos.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@taiki-e
Copy link
Owner

taiki-e commented Jun 8, 2022

I believe the error is due to ~ being treated as just a string when quoted (I just remembered that I had encountered that problem before). You can remove the quote and disable SC2086 as follows, or you can use the HOME environment variable instead.

install-action/main.sh

Lines 80 to 82 in bc0a06a

# shellcheck disable=SC2086
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "${url}" \
| tar xzf - -C ${CARGO_HOME:-~/.cargo}/bin

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@NobodyXu
Copy link
Collaborator Author

NobodyXu commented Jun 8, 2022

@taiki-e Finally fixed it!

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Copy link
Owner

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @NobodyXu!

@taiki-e taiki-e merged commit 2e2f046 into taiki-e:main Jun 10, 2022
@NobodyXu NobodyXu deleted the feature/cargo-binstall branch June 10, 2022 13:21
@taiki-e
Copy link
Owner

taiki-e commented Jun 10, 2022

Published in 1.4.0.

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

Successfully merging this pull request may close these issues.

Suggestion/Supporting cargo-binstall?
2 participants