Skip to content

Commit

Permalink
k, well dev needs an unmodified env
Browse files Browse the repository at this point in the history
Otherwise when unsetting the env the polluted additions remain.

There’s probably more complicated ways to solve this, but assuming `pkgx` is in the PATH is reasonable for the usage of this tool IMO.
  • Loading branch information
mxcl committed Jan 7, 2025
1 parent 28cc0fd commit 2238454
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions projects/pkgx.sh/dev/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ display-name: dev
versions:
github: pkgxdev/dev

dependencies:
pkgx.sh: ^1,^2
# strictly needed but breaks `dev` as it needs a virgin env
# dependencies:
# pkgx.sh: ^1,^2

build:
- mkdir -p {{prefix}}/bin {{prefix}}/share/pkgx/dev
Expand All @@ -19,7 +20,8 @@ build:
prop: |
#!/bin/sh
d="$(cd "$(dirname $0)"/.. && pwd)"
exec "$d/share/pkgx/dev/app.ts" "$@"
deno="$(pkgx +deno -- which deno)"
exec "$deno" run -A "$d/share/pkgx/dev/app.ts" "$@"
provides:
- bin/dev

Expand Down

1 comment on commit 2238454

@jhheider
Copy link
Contributor

Choose a reason for hiding this comment

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

you can probably just put it in the test, rather than dep it:

test:
  env:
    PATH: '{{pkgx.prefix/pkgx.sh/v\*/bin:$PATH'

Please sign in to comment.