Skip to content

Commit

Permalink
fix: add --global flag for deno installation
Browse files Browse the repository at this point in the history
close hayd#112
  • Loading branch information
e-kwsm committed Dec 4, 2024
1 parent 09f9994 commit fa39ca0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Use deno
install or update udd:

```sh
deno install -rf --allow-read=. --allow-write=. --allow-net https://deno.land/x/udd/main.ts
deno install --global -rf --allow-read=. --allow-write=. --allow-net https://deno.land/x/udd/main.ts
```

_You may need to include the deno bin directory in your PATH._
Expand Down
10 changes: 9 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,15 @@ async function upgrade() {
console.log(url);

// TODO support alternative name to udd if that's what's been used before.
await spawn([Deno.execPath(), "install", "--reload", "-qAfn", "udd", url]);
await spawn([
Deno.execPath(),
"install",
"--global",
"--reload",
"-qAfn",
"udd",
url,
]);
}

async function main(args: string[]) {
Expand Down

0 comments on commit fa39ca0

Please sign in to comment.