This repository was archived by the owner on Mar 1, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed
Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 11{
22 "recommendations" : [
33 " shakram02.bash-beautify" , " jetmartin.bats" , " timonwong.shellcheck"
4- ],
5- // List of extensions recommended by VS Code that should not be recommended for users of this workspace.
6- "unwantedRecommendations" : [
7-
84 ]
95}
Original file line number Diff line number Diff line change 1- 4.1.2 -1
1+ 4.1.3 -1
Original file line number Diff line number Diff line change 4040# prevent bash -x
4141set +x
4242
43- bash_version_major=$( echo " $BASH_VERSION " | cut -d' .' -f1)
43+ bash_version_full=$( bash --version | head -n 1)
44+ bash_version_major=$( echo " $bash_version_full " | cut -d ' ' -f 4 | cut -d ' .' -f 1)
45+ bash_version_minor=$( echo " $bash_version_full " | cut -d ' ' -f 4 | cut -d ' .' -f 2)
4446
4547# pipeline content to pipe... if it is wslclip
4648if [[ " $wslu_util_name " == " wslclip" ]]; then
@@ -152,11 +154,12 @@ function error_echo {
152154 exit " $2 "
153155}
154156
155- # Check if the major version number is greater than 5
156- if [ " $( expr " $bash_version_major " \> = 5 ) " -ne 1 ] ; then
157- error_echo " You should use Bash 5 and higher; exiting ." 1
157+ # Check if the version number of bash is greater or equal to 4.4
158+ if [ " $bash_version_major " -lt 4 ] || { [ " $bash_version_major " -eq 4 ] && [ " $bash_version_minor " -lt 4 ] ; } ; then
159+ error_echo " Bash version is too old. Please upgrade to 4.4 or later ." 1
158160fi
159161
162+
160163# source default config
161164if [ -f " ${wslu_dest_dir}${wslu_prefix} /share/wslu/conf" ]; then
162165 debug_echo " source default setting"
You can’t perform that action at this time.
0 commit comments