Skip to content

Commit

Permalink
Merge pull request #493 from wix/add-quotes-to-help-debugging
Browse files Browse the repository at this point in the history
Add quotes around xcode version output
  • Loading branch information
DanielZlotin authored Jan 7, 2018
2 parents 259a903 + 03132ff commit d93d984
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion detox/src/devices/AppleSimUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class AppleSimUtils {
const match = /^Xcode (\S+)\.*\S*\s*/.exec(stdout);
const majorVersion = parseInt(_.get(match, '[1]'));
if (!_.isInteger(majorVersion) || majorVersion < 1) {
throw new Error(`Can't read Xcode version, got: ${stdout}`);
throw new Error(`Can't read Xcode version, got: '${stdout}'`);
}
return majorVersion;
}
Expand Down
4 changes: 2 additions & 2 deletions detox/src/devices/AppleSimUtils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ describe('AppleSimUtils', () => {
await uut.getXcodeVersion();
fail(`should throw`);
} catch (e) {
expect(e).toEqual(new Error(`Can't read Xcode version, got: undefined`));
expect(e).toEqual(new Error(`Can't read Xcode version, got: 'undefined'`));
}
});

Expand All @@ -200,7 +200,7 @@ describe('AppleSimUtils', () => {
await uut.getXcodeVersion();
fail(`should throw`);
} catch (e) {
expect(e).toEqual(new Error(`Can't read Xcode version, got: Xcode bla`));
expect(e).toEqual(new Error(`Can't read Xcode version, got: 'Xcode bla'`));
}
});
});
Expand Down

0 comments on commit d93d984

Please sign in to comment.