Skip to content

Commit

Permalink
windows release
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGOrtega committed Aug 10, 2022
1 parent a7944f8 commit 3b8d1ea
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,12 @@ const jitsuEventPayload = async ({
const { cloud: backend = '', ...extraRest } = extra;
extraRest.ci = guessCI();

const { release = os.release() } = await getos();
const osname = OS();
let { release = os.release() } = await getos();
if (osname === 'windows') {
const [major, minor, build] = release.split('.');
release = `${build}.${major}.${minor}-`;
}

return {
user_id: await userId({ cml }),
Expand All @@ -162,7 +167,7 @@ const jitsuEventPayload = async ({
tool_name: 'cml',
tool_version: VERSION,
tool_source: '',
os_name: OS(),
os_name: osname,
os_version: release,
backend,
error,
Expand Down

1 comment on commit 3b8d1ea

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

CML watermark

Please sign in to comment.