-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Inso-third-pass #7588
Inso-third-pass #7588
Conversation
export function getAppDataDir(app: string): string { | ||
switch (process.platform) { | ||
case 'darwin': | ||
return path.join(homedir(), 'Library', 'Application Support', app); |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal Warning
case 'darwin': | ||
return path.join(homedir(), 'Library', 'Application Support', app); | ||
case 'win32': | ||
return path.join(process.env.APPDATA || path.join(homedir(), 'AppData', 'Roaming'), app); |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal Warning
case 'win32': | ||
return path.join(process.env.APPDATA || path.join(homedir(), 'AppData', 'Roaming'), app); | ||
case 'linux': | ||
return path.join(process.env.XDG_DATA_HOME || path.join(homedir(), '.config'), app); |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal Warning
@@ -33,7 +32,8 @@ export async function exportSpecification( | |||
const specFromDb = identifier ? loadApiSpec(db, identifier) : await promptApiSpec(db, !!ci); | |||
|
|||
if (!specFromDb) { | |||
logger.fatal('Specification not found.'); | |||
const pathToSearch = getAbsolutePath({ workingDir, src }); | |||
logger.fatal('Specification not found at: ' + pathToSearch); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
* inline utils and clean outputs * improving the log output * dx * fix tests abstract path * return early * flatten options and utils * flatten logger * add export file and git examples * flatten cli.ts * use await api and flatten * flatten cli * fix test
* inline utils and clean outputs * improving the log output * dx * fix tests abstract path * return early * flatten options and utils * flatten logger * add export file and git examples * flatten cli.ts * use await api and flatten * flatten cli * fix test
notes
npm run inso-start
is betternext steps
ref INS-4021