Skip to content

Commit

Permalink
\s is not supported by sed on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Gildas Cherruel committed Aug 9, 2023
1 parent b62912f commit 81aba44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hooks/common/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function get_config() { # {{{2
function get_chart_version() { # {{{2
local status
local file=$1
local version=$(grep "^version:" "$file" | sed -E "s/^version:\s+([0-9]+\.[0-9]+\.[0-9]+)/\1/")
local version=$(grep "^version:" "$file" | sed -E "s/^version:[ ]+([0-9]+\.[0-9]+\.[0-9]+)/\1/")
status=$? ; (( status )) && ERROR="Failed to get the version from $file" && return $status
printf "%s" $version
return 0
Expand Down

0 comments on commit 81aba44

Please sign in to comment.