From da2754f09ce8dcf1e6bbddc3076b24f5cba6bcc4 Mon Sep 17 00:00:00 2001 From: Turiok Date: Sun, 16 Feb 2025 18:44:12 +0100 Subject: [PATCH] Specify the version of the removal --- SC2040.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SC2040.md b/SC2040.md index 6ec2ce3..9cc3ed7 100644 --- a/SC2040.md +++ b/SC2040.md @@ -1,7 +1,11 @@ ## `#!/bin/sh` was specified, so ____ is not supported, even when sh is actually bash. +_Note removed in [v0.4.2 - 2016-01-10](https://github.com/koalaman/shellcheck/commit/f77821625c8e9203712f276d470341459ee60455)_ + The shebang indicates that the script works with `/bin/sh`, but you are using non-standard features that may not work with `/bin/sh`, **even if /bin/sh is actually bash**. Bash behaves differently when invoked as `sh`, and disabling support for the highlighted feature is one part of that. Specify `#!/usr/bin/env bash` to ensure that bash (or your shell of choice) will be used, or rewrite the script to be more portable. The Ubuntu wiki has [a list of portability issues](https://wiki.ubuntu.com/DashAsBinSh) and suggestions on how to rewrite them. + +