Skip to content

Commit

Permalink
chore: remove async/await from a synchronous function
Browse files Browse the repository at this point in the history
validateMonitorPath used to use an async flow and await on it. that's no longer the case and the function no longer needs to be async.
  • Loading branch information
Shesekino committed Jun 28, 2020
1 parent d8dddaf commit 2e06842
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cli/commands/monitor/index.ts
Expand Up @@ -117,7 +117,7 @@ async function monitor(...args0: MethodArgs): Promise<any> {
for (const path of args as string[]) {
debug(`Processing ${path}...`);
try {
await validateMonitorPath(path, options.docker);
validateMonitorPath(path, options.docker);
let analysisType = 'all';
let packageManager;
if (options.allProjects) {
Expand Down Expand Up @@ -302,7 +302,7 @@ function generateMonitorMeta(options, packageManager?): MonitorMeta {
};
}

async function validateMonitorPath(path, isDocker) {
function validateMonitorPath(path, isDocker) {
const exists = fs.existsSync(path);
if (!exists && !isDocker) {
throw new Error('"' + path + '" is not a valid path for "snyk monitor"');
Expand Down

0 comments on commit 2e06842

Please sign in to comment.