Comment

Comment by latexr

> They have inherited the second biggest mistake of shellscripts; Requiring the user to manually check $? after each command.

This isn’t true for Ruby nor shell scripts. In Ruby you have `system` or `Open3`. In shell scripts you:

  if my_command
  then
    on_success
  else
    on_failure
  fi
Shellcheck even warns you of that.

https://www.shellcheck.net/wiki/SC2181

parent latexr 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton