Skip to content

make sed command fails on macOS #242

@jamesstout

Description

@jamesstout
james@Jamess-iMac: ~/Projects/nextcloud/server/apps/maps on master
$ make
...
sed -i 's/L\.Browser\.touch/L.Browser.mobile/g' node_modules/leaflet.elevation/dist/Leaflet.Elevation-0.0.2.min.js
sed: 1: "node_modules/leaflet.el ...": extra characters at the end of n command
make[1]: *** [npm] Error 1
make: *** [build] Error 2

A portable (not POSIX though, sed -i is not POSIX-compliant) fix is:

sed -i.bak 's/L\.Browser\.touch/L.Browser.mobile/g' \
node_modules/leaflet.elevation/dist/Leaflet.Elevation-0.0.2.min.js && rm \
node_modules/leaflet.elevation/dist/Leaflet.Elevation-0.0.2.min.js.bak

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions