Skip to content

Commit 7727086

Browse files
Roshan NikamRoshan Nikam
authored andcommitted
updated the buildid to build_hashed_id
1 parent 29b0bdd commit 7727086

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

bin/commands/runs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const archiver = require("../helpers/archiver"),
1616
downloadBuildArtifacts = require('../helpers/buildArtifacts').downloadBuildArtifacts,
1717
updateNotifier = require('update-notifier'),
1818
pkg = require('../../package.json');
19-
2019
module.exports = function run(args) {
2120
let bsConfigPath = utils.getConfigPath(args.cf);
2221
//Delete build_results.txt from log folder if already present.
@@ -135,7 +134,8 @@ module.exports = function run(args) {
135134
utils.setProcessHooks(data.build_id, bsConfig, bs_local, args);
136135
let message = `${data.message}! ${Constants.userMessages.BUILD_CREATED} with build id: ${data.build_id}`;
137136
let dashboardLink = `${Constants.userMessages.VISIT_DASHBOARD} ${data.dashboard_url}`;
138-
let buildReportData = {
137+
let buildReportData = {
138+
'build_id': data.build_id,
139139
'user_id': data.user_id,
140140
'parallels': userSpecifiedParallels
141141
};

bin/helpers/usageReporting.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ function send(args) {
194194
const payload = {
195195
event_type: "cypress_cli_stats",
196196
data: {
197-
build_id: data.build_id,
197+
build_hashed_id: data.build_id,
198198
user_id: data.user_id,
199199
parallels: data.parallels,
200200
bstack_json: sanitizedbsConfig,

bin/helpers/utils.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,12 @@ exports.setOtherConfigs = (bsConfig, args) => {
913913
}
914914

915915
exports.readBsConfigJSON = (bsConfigPath) => {
916-
return fs.existsSync(bsConfigPath) ? fs.readFileSync(bsConfigPath, 'utf-8') : null;
916+
try {
917+
fs.accessSync(bsConfigPath, fs.constants.R_OK);
918+
return fs.readFileSync(bsConfigPath, 'utf-8');
919+
} catch (err) {
920+
return null;
921+
}
917922
}
918923

919924
exports.getCypressJSON = (bsConfig) => {

0 commit comments

Comments
 (0)