Skip to content

Commit

Permalink
Using bf is_not_file
Browse files Browse the repository at this point in the history
  • Loading branch information
bfren committed Oct 24, 2023
1 parent 837cb60 commit 2ce8982
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions overlay/etc/nu/scripts/bf-aspnet/run.nu
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,15 @@ export def preflight [...args] {

# verify assembly exists
let assembly_path = $"($dir_live)/($assembly)"
if (bf fs is_not_file $assembly_path) {
if ($assembly_path | bf fs is_not_file) {
bf write notok $"($assembly_path) not found."
go_to_sleep 30sec
let for = 30sec
bf write $"Sleeping for ($for)."
sleep $for
exit 66
}

# start application
bf write "Starting ASP.NET application."
bf write debug $" .. ($assembly_path)."
}

# Sleep the thread for a set about of time
def go_to_sleep [
for: duration # Amount of time to sleep for
] {
bf write $"Sleeping for ($for)."
sleep $for
}

0 comments on commit 2ce8982

Please sign in to comment.