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

fix: executable issue for linux users #1115

Merged
merged 1 commit into from
Dec 9, 2024
Merged

Conversation

kanadgupta
Copy link
Member

@kanadgupta kanadgupta commented Dec 9, 2024

🧰 Changes

Linux requires the -S flag when passing options to node command-line in executable files. This was fun to troubleshoot 🥴

🧬 QA & Testing

Can Linux users run the CLI again? 😮‍💨

@kanadgupta kanadgupta marked this pull request as ready for review December 9, 2024 19:36
@kanadgupta kanadgupta added the bug Something isn't working label Dec 9, 2024
@kanadgupta kanadgupta changed the title fix: executable fixes for linux users fix: executable issue for linux users Dec 9, 2024
Copy link
Contributor

@kellyjosephprice kellyjosephprice left a comment

Choose a reason for hiding this comment

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

TIL: env -S, how does that fix this???!

@kanadgupta kanadgupta merged commit 4319fb5 into next Dec 9, 2024
13 checks passed
@kanadgupta kanadgupta deleted the kanad-2024-12-09/shebang-fix branch December 9, 2024 19:37
@kanadgupta
Copy link
Member Author

@kellyjosephprice i'm flying blind here so i could not tell you lol

kanadgupta pushed a commit that referenced this pull request Dec 9, 2024
## [9.0.1-next.2](v9.0.1-next.1...v9.0.1-next.2) (2024-12-09)

### Bug Fixes

* executable issue for linux users ([#1115](#1115)) ([4319fb5](4319fb5))

[skip ci]
@kanadgupta
Copy link
Member Author

🎉 This PR is included in version 9.0.1-next.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

kanadgupta pushed a commit that referenced this pull request Dec 9, 2024
## [9.0.1](v9.0.0...v9.0.1) (2024-12-09)

### Bug Fixes

* executable issue for linux users ([#1115](#1115)) ([4319fb5](4319fb5))
* repository URL fix ([2103a29](2103a29))

[skip ci]
@kanadgupta
Copy link
Member Author

🎉 This PR is included in version 9.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@joshbeard
Copy link

joshbeard commented Dec 10, 2024

For what it's worth, the -S argument to the env command isn't available in BusyBox environments (e.g. the node:alpine Docker images). A solution there is to install coreutils.

/usr/bin/env: unrecognized option: S
BusyBox v1.37.0 (2024-11-19 21:09:16 UTC) multi-call binary.

@kanadgupta
Copy link
Member Author

@joshbeard appreciate you flagging this — mind taking a look at #1117 and seeing if that takes care of this issue? If not, might be good to add additional docs to our setup instructions.

kanadgupta added a commit that referenced this pull request Dec 10, 2024
## 🧰 Changes

The whole reasoning behind #1115 is because we pass flags in order to
avoid emitting this `ExperimentalWarning` for Node v20 users:

![CleanShot 2024-12-10 at 12 12
00@2x](https://github.com/user-attachments/assets/de75f8ff-06d5-43c2-be44-ddedba60187e)

Per [this
comment](#1115 (comment)),
adding `-S` might be problematic for certain container setups. As a
result, I just overhauled how we import JSON in our production code so
we don't need that Node CLI flag at all.

At some point I'd love if we got to a point where we can fully rely on
the oclif config for `package.json` attributes but today is not that
day!

## 🧬 QA & Testing

When you check out this branch and run the following commands...

- Do they run properly without hanging? (hopefully yes)
- Do you see Node `ExperimentalWarning` outputs (like the above
screenshot) at any point? (hopefully no)


```sh
npm ci && npm run build
bin/run.js
```
kanadgupta pushed a commit that referenced this pull request Dec 10, 2024
## [9.0.2-next.1](v9.0.1...v9.0.2-next.1) (2024-12-10)

### Bug Fixes

* remove import attributes ([#1117](#1117)) ([e662654](e662654)), closes [#1115](#1115) [/github.com//pull/1115#issuecomment-2532123627](https://github.com//github.com/readmeio/rdme/pull/1115/issues/issuecomment-2532123627)

[skip ci]
kanadgupta pushed a commit that referenced this pull request Dec 11, 2024
## [9.0.2](v9.0.1...v9.0.2) (2024-12-11)

### Bug Fixes

* **autocomplete:** bad alias ([#1118](#1118)) ([5b8d928](5b8d928))
* remove import attributes ([#1117](#1117)) ([e662654](e662654)), closes [#1115](#1115) [/github.com//pull/1115#issuecomment-2532123627](https://github.com//github.com/readmeio/rdme/pull/1115/issues/issuecomment-2532123627)

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

Successfully merging this pull request may close these issues.

3 participants