-
Notifications
You must be signed in to change notification settings - Fork 79
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
No longer able to install Salesforce CLI on alpine linux (Docker): "env: unrecognized option: S" #3153
Comments
Hello @gdman 👋 It looks like you didn't include the full Salesforce CLI version information in your issue. A few more things to check:
Thank you! |
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
This issue has been linked to a new work item: W-17445225 |
Thanks for reporting this @gdman, we are looking into it |
I've been playing around with this for a while but can't think of a way to make it work on macos/ubuntu and busybox's even in latest busybox,
the suggested way of doing this cross-platform seems to be making a script ( Given Alpine linux isn't really supported by us (you can't use the official installers, require node's alpine which isn't tier 1 supported) I'm not sure if we would make such a big change like that, we'll discuss with the team what are the options and get back. |
After discussing with the team we decided we can't prioritize fixing this for Alpine linux. The suggested workaround for Alpine Linux users is to use Hopefully once we remove the chain of dependencies importing |
@cristiand391 Sorry to ask here, in a closed thread, but I would like to have more information about this statement: "Given Alpine linux isn't really supported by us (you can't use the official installers, require node's alpine which isn't tier 1 supported)" What are the SO supported? apart from Ubuntu what others? Where is it documented? The usage of Alpine is because it is lightweight and it is a huge difference between using Alpine and Ubuntu for instance. If Alpine it is not supported, it would be great to know what other lightweight options we have. Thanks a lot. |
I'll leave the question of officially supported operating systems to Salesforce (I'd be interested too). Whilst it might not be supported (as I only found out from this thread), I've been using Alpine with Salesforce CLI successfully for at least 6/7 years and continue to use it now. This thread is the only Alpine compatibility issue I've had and was easily worked around by installing coreutils. |
Well, there is another issue, you can't install Salesforce CLI using the bundle. You can only install salesforce CLI by using npm. Wether this should be a choice, install the bundle or using npm ... with Alpine you can only use npm. |
The CLI is written in JS so we need to ship a node.js binary for each platform we support, right now we ship installer and tarballs for:
This is because all these platforms are tier 1 (except for win arm64 which is tier 2) and ship official binaries, we don't support alpine mainly because it's in the experimental support tier (there's no official builds for it): https://github.com/nodejs/node/blob/main/BUILDING.md#supported-platforms That's why you can't use our linux installers (glibc required) on alpine. |
Thanks a lot @cristiand391 this information is very helpful for us. |
Summary
We run all of our builds in Docker containers using Alpine linux as the base operating system. Since last week our build has started failing - SF will no longer run.
The error message is:
"env: unrecognized option: S"
I've done some investigation, it looks like
#!/usr/bin/env node
changed to#!/usr/bin/env -S node --no-deprecation
as part of this PR: https://github.com/salesforcecli/cli/pull/1971/files. This makes use of the -S option inenv
but this option isn't available on all operating systems. In particular, this isn't available in Busybox which is what's used in Alpine Linux.Please could you revert this changes and look to implement another way without use of -S?
Version:
2.69.14
Update:
I have worked around this by adding coreutils (
apk add coreutils
) into the image. This has the newer version ofenv
which supports the-S
argument.This could still be other cases of the same issue.
The text was updated successfully, but these errors were encountered: