Skip to content

Commit

Permalink
fix: 🚑️ cross platform shebang
Browse files Browse the repository at this point in the history
Taken from here:
casey/just#1549 (comment)
  • Loading branch information
melMass committed Nov 21, 2023
1 parent 255e2bc commit 0b41d6b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ i:
# Set nu as the shell and set the table mode to light
set shell := ['nu', '-m', 'light', '-c']

shebang := if os() == 'windows' {
'nu'
} else {
'/usr/bin/env nu'
}


run-poc:
#!/usr/bin/env nu
#!{{shebang}}
let options = ("{{pocs}}" | lines)
let choice = ($options | input list $"(ansi yellow_italic) Which POC to run?(ansi reset)")
if ($choice | is-empty) {
Expand Down

0 comments on commit 0b41d6b

Please sign in to comment.