File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -103,10 +103,12 @@ if [ "$SENTRY_COPY_OPTIONS_FILE" = true ]; then
103103 if [ -n " $SENTRY_ENVIRONMENT " ]; then
104104 if " $LOCAL_NODE_BINARY " -e "
105105 var fs = require('fs');
106- var opts = JSON.parse(fs.readFileSync('$SENTRY_OPTIONS_FILE_PATH ', 'utf8'));
106+ var sourcePath = process.argv[1];
107+ var destinationPath = process.argv[2];
108+ var opts = JSON.parse(fs.readFileSync(sourcePath, 'utf8'));
107109 opts.environment = process.env.SENTRY_ENVIRONMENT;
108- fs.writeFileSync(' $SENTRY_OPTIONS_FILE_DESTINATION_PATH ' , JSON.stringify(opts));
109- " 2> /dev/null; then
110+ fs.writeFileSync(destinationPath , JSON.stringify(opts));
111+ " -- " $SENTRY_OPTIONS_FILE_PATH " " $SENTRY_OPTIONS_FILE_DESTINATION_PATH " 2> /dev/null; then
110112 echo " [Sentry] Overriding 'environment' from SENTRY_ENVIRONMENT environment variable"
111113 else
112114 echo " [Sentry] Failed to override environment, copying file as-is." 1>&2
You can’t perform that action at this time.
0 commit comments