Skip to content

Commit

Permalink
feat: update shebang for homebrew
Browse files Browse the repository at this point in the history
update shebang for homebrew installations

Changes to be committed:
	modified:   .github/wordlist.txt
	modified:   README.md
	modified:   examples/quotes.1min.js
	modified:   examples/weatherAlerts.5min.ts
  • Loading branch information
theogainey committed Jun 3, 2022
1 parent d6382ba commit 7b97794
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ bitbar
TypeScript
runtime
Homebrew
homebrew
darkMode
isDarkMode
Async
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ In the xbar plugins directory create a file named with the following format:

On the first line of that file include a shebang in the following format:

`#!/usr/bin/env -S "${HOME}/.deno/bin/deno" run <permissions>`
`#!/usr/bin/env -S -P/${HOME}/.deno/bin:/opt/homebrew/bin deno run <permissions>`

This module can be imported to the plugin with the following code:

Expand All @@ -57,7 +57,7 @@ Ensure that the file is executable by using the command `chmod +x filename.js`.
### Example

```
#!/usr/bin/env -S "${HOME}/.deno/bin/deno" run --allow-env
#!/usr/bin/env -S -P/${HOME}/.deno/bin:/opt/homebrew/bin deno run --allow-env
import { xbar, separator, isDarkMode } from "https://deno.land/x/xbar@LATEST_VERSION/mod.ts";
Expand Down Expand Up @@ -159,7 +159,7 @@ Will always return `false` if environment permission has not previously been
granted `--allow-env`

```
#!/usr/bin/env deno run --allow-env
#!/usr/bin/env -S -P/${HOME}/.deno/bin:/opt/homebrew/bin deno run --allow-env
import { isDarkMode } from "https://deno.land/x/xbar@LATEST_VERSION/mod.ts";
const darkMode = await isDarkMode();
Expand Down
2 changes: 1 addition & 1 deletion examples/quotes.1min.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env "${HOME}/.deno/bin/deno" run --allow-net --allow-env
#!/usr/bin/env -S -P/${HOME}/.deno/bin:/opt/homebrew/bin deno run --allow-net --allow-env
import {
isDarkMode,
separator,
Expand Down
2 changes: 1 addition & 1 deletion examples/weatherAlerts.5min.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env "${HOME}/.deno/bin/deno" run --allow-net
#!/usr/bin/env -S -P/${HOME}/.deno/bin:/opt/homebrew/bin deno run --allow-net
import { separator, xbar } from 'https://deno.land/x/xbar@v2.0.0/mod.ts';
import {
fetchLocation,
Expand Down

0 comments on commit 7b97794

Please sign in to comment.