Skip to content

Commit

Permalink
trim fileName
Browse files Browse the repository at this point in the history
Solves situation when env var is used without quotes, e.g. `ENV_VAR=aaa node ./cli.js` is used
  • Loading branch information
talaikis authored Oct 28, 2023
1 parent 3b86fa8 commit 6b826fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const ANDROID_KEYS_DIR_PATH = path.join(
const PROJECT_DIRECTORY_IOS_PATH = path.join(PROJECT_ROOT_DIR_PATH, 'ios');

module.exports.getKeys = (KEYS_FILE_NAME) => {
const jniJsonFilePath = `${PROJECT_ROOT_DIR_PATH}${KEYS_FILE_NAME}`;
const jniJsonFilePath = `${PROJECT_ROOT_DIR_PATH}${KEYS_FILE_NAME}`.trim();
const keysJson = fs.readJSONSync(jniJsonFilePath);
const secureKeys = keysJson;
return secureKeys;
Expand Down Expand Up @@ -155,6 +155,7 @@ module.exports.makeFileInAndroidMainAssetsFolder = (fileContent, fileName) => {
fs.outputFileSync(filePath, fileContent);
return true;
} catch (error) {
console.error(error)
return false;
}
};
Expand Down

0 comments on commit 6b826fa

Please sign in to comment.