Skip to content

Commit

Permalink
appdirs
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGOrtega committed Jul 9, 2022
1 parent f6ed7bf commit d97b0c1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"@octokit/graphql": "^4.8.0",
"@octokit/plugin-throttling": "^3.5.2",
"@octokit/rest": "18.0.0",
"appdirs": "^1.1.0",
"chokidar": "^3.5.3",
"colors": "1.4.0",
"exponential-backoff": "^3.1.0",
Expand Down
5 changes: 3 additions & 2 deletions src/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const fs = require('fs').promises;
const fetch = require('node-fetch');
const ProxyAgent = require('proxy-agent');
const { v4: uuidv4, v5: uuidv5 } = require('uuid');
const appdirs = require('appdirs');
const winston = require('winston');

const { version: VERSION } = require('../package.json');
Expand Down Expand Up @@ -86,8 +87,8 @@ const userId = async () => {
}

let id = uuidv4();
const newPath = '';
const oldPath = '';
const oldPath = appdirs.userConfigDir('dvc/user_id', 'iterative');
const newPath = appdirs.userConfigDir('iterative/telemetry');
if (path.exists(newPath)) {
id = await fs.readFile(newPath);
} else {
Expand Down

1 comment on commit d97b0c1

@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.