Skip to content

Commit

Permalink
Use xargs -0 instead of sed, as this is easier to understand.
Browse files Browse the repository at this point in the history
Fixed atom#4337
Fixes atom#4336
  • Loading branch information
Paul Wagland committed Dec 5, 2014
1 parent 5da4846 commit eb6ce74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion atom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if [ $OS == 'Mac' ]; then

# If ATOM_PATH isn't a executable file, use spotlight to search for Atom
if [ ! -x "$ATOM_PATH/$ATOM_APP_NAME" ]; then
ATOM_PATH="$(mdfind "kMDItemCFBundleIdentifier == 'com.github.atom'" | grep -v ShipIt | sed '{s#/[^/]*$##; q; }')"
ATOM_PATH="$(mdfind "kMDItemCFBundleIdentifier == 'com.github.atom'" | grep -v ShipIt | head -1 | xargs -0 dirname)"
fi

# Exit if Atom can't be found
Expand Down

0 comments on commit eb6ce74

Please sign in to comment.