Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quotes around xcode version output #493

Merged
merged 1 commit into from
Jan 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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