Skip to content

Commit

Permalink
Block sending requests if the deployment key is missed (#1967)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreidubov authored Nov 5, 2020
1 parent c0cc20e commit 0a3db5a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CodePush.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ async function tryReportStatus(statusReport, resumeListener) {
if (statusReport.appVersion) {
log(`Reporting binary update (${statusReport.appVersion})`);

if (!config.deploymentKey) {
throw new Error("Deployment key is missed");
}

const sdk = getPromisifiedSdk(requestFetchAdapter, config);
await sdk.reportStatusDeploy(/* deployedPackage */ null, /* status */ null, previousLabelOrAppVersion, previousDeploymentKey);
} else {
Expand Down
2 changes: 1 addition & 1 deletion code-push-plugin-testing-framework/script/testUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var TestUtil = (function () {
options = options || {};
// set default options
if (options.maxBuffer === undefined)
options.maxBuffer = 1024 * 500;
options.maxBuffer = 1024 * 1024 * 500;
if (options.timeout === undefined)
options.timeout = 10 * 60 * 1000;
if (!options.noLogCommand)
Expand Down
2 changes: 1 addition & 1 deletion test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class RNIOS extends Platform.IOS implements RNPlatform {
const hashWithParen = targetEmulator.match(hashRegEx)[0];
const hash = hashWithParen.substr(1, hashWithParen.length - 2);
return TestUtil.getProcessOutput("xcodebuild -workspace " + path.join(iOSProject, TestConfig.TestAppName) + ".xcworkspace -scheme " + TestConfig.TestAppName +
" -configuration Release -destination \"platform=iOS Simulator,id=" + hash + "\" -derivedDataPath build", { cwd: iOSProject, maxBuffer: 1024 * 1024 * 20, noLogStdOut: true });
" -configuration Release -destination \"platform=iOS Simulator,id=" + hash + "\" -derivedDataPath build EXCLUDED_ARCHS=arm64", { cwd: iOSProject, maxBuffer: 1024 * 1024 * 500, noLogStdOut: true });
})
.then<void>(
() => { return null; },
Expand Down

0 comments on commit 0a3db5a

Please sign in to comment.