Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

NetBSD: All functionality fails; "-S" is not a portable option to env

Closed
#1,418 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
64/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript, node.js
Domain
build-system, cli

Research direction

Start with the fix-bundle script in package.json and the generated bin/bundle.js entry point, then reproduce npx spago build or --help on NetBSD. Check how the bundled executable invokes env and verify that the resulting package works without relying on NetBSD-unsupported -S behavior; done means Spago commands run successfully on NetBSD.

Written by the indexing model from the issue text.

Description

Spago 1.0.4 installed via npm fails to do anything on NetBSD:

-bash-5.3$ npx spago build
env: unknown option -- S

Usage: env [-0i] [-C dir] [-u name] [--] \
           [name=value ...] [--] \
           [utility [arg ...] ]
-bash-5.3$ npx spago --help
env: unknown option -- S

Usage: env [-0i] [-C dir] [-u name] [--] \
           [name=value ...] [--] \
           [utility [arg ...] ]
-bash-5.3$ npx spago
env: unknown option -- S

Usage: env [-0i] [-C dir] [-u name] [--] \
           [name=value ...] [--] \
           [utility [arg ...] ]

I tried the version of spago from pkg_src first, but that's the old dhall-spago instead of the current yaml-spago.

I could not find an equivalent to -S in the env(1) man page on NetBSD.

Changing the fix-bundle script in spago's package.json to a no-op, and undoing the change to spago's bin/bundle.js caused the build to succeed:

[641 of 642] Compiling Test.Main
[642 of 642] Compiling Main
           Src   Lib   All
Warnings     0     0     0
Errors       0     0     0

✓ Build succeeded.
-bash-5.3$ grep fix-bundle node_modules/spago/package.json
    "fix-bundle": ":",
    "bundle": "spago bundle -p spago-bin && npm run fix-bundle",
    "prepublishOnly": "spago build && ./bin/index.dev.js bundle -p spago-bin && npm run fix-bundle && ./bin/index.dev.js bundle -p docs-search-client-halogen",
-bash-5.3$ head -n 1 node_modules/spago/bin/bundle.js
#!/usr/bin/env node
Dominant language
PureScript
Stars
831
Forks
138
Avg merge
6h 21m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from purescript/spago

All issues in purescript/spago

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.