Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
spinner.start();
let filename = path.join(dir, `${photo.id}.jpg`);
if (flags.save && isPath(flags.save)) {
const savePath = pathFixer(flags.save);
filename = path.join(savePath, `${photo.id}.jpg`);
if (isImage(flags.save)) {
filename = savePath;
}
}
const remotePhoto = new RemoteFile(url, filename);
remotePhoto.download().then(async (fileInfo) => {
config.set('counter', config.get('counter') + 1);
if (!flags.quiet) spinner.succeed();
if (setAsWP && !flags.save) {
if (flags.screen || flags.scale) {
if (process.platform !== 'darwin') {
console.log();
logger.warn(
chalk`{dim > Sorry, this function ({underline ${
flags.screen ? '"screen"' : '"scale"'
}}) is available {bold only on MacOS}}`,
);
console.log();
}
spinner.start();
let filename = path.join(dir, `${photo.id}.jpg`);
if (flags.save && isPath(flags.save)) {
const savePath = pathFixer(flags.save);
filename = path.join(savePath, `${photo.id}.jpg`);
if (isImage(flags.save)) {
filename = savePath;
}
}
const remotePhoto = new RemoteFile(url, filename);
const fileInfo = await remotePhoto.download();
config.set("counter", config.get("counter") + 1);
if (!flags.quiet) spinner.succeed();
if (setAsWP && !flags.save) {
if (flags.screen || flags.scale) {
if (process.platform !== "darwin") {
console.log();
logger.warn(
chalk`{dim > Sorry, this function ({underline ${
flags.screen ? '"screen"' : '"scale"'
}}) is available {bold only on MacOS}}`,
);
console.log();