Skip to content

Commit

Permalink
Ada --setxattr: catch invalid input; fixes #48
Browse files Browse the repository at this point in the history
  • Loading branch information
onnozweers committed Jan 29, 2025
1 parent 661fa2b commit 6614069
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ada/ada
Original file line number Diff line number Diff line change
Expand Up @@ -2100,7 +2100,10 @@ api_call () {
case $command in
setxattr )
attributes=$(cat $xattr_file)
xattr_json=$(to_json "$attributes")
xattr_json=$(to_json "$attributes") || {
echo "ERROR: invalid attributes provided." 1>&2
exit 1
}
echo "$xattr_json"
(
$debug && set -x # If --debug is specified, show (only) curl command
Expand Down

0 comments on commit 6614069

Please sign in to comment.