-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
nice one! will test it. |
tasks = require(path.resolve(commander.file)); | ||
} catch (e) { | ||
modulePath = resolveCwd(`./${commander.file}`); | ||
if (!modulePath || !fs.existsSync(modulePath)) { // eslint-disable-line |
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.
trying to find a reason to have !fs.existsSync(modulePath)
here and can't. looks like resolveCwd(`./${commander.file}`)
already solves all the local path cases. part of my testing code:
let modulePath = null;
if (commander.preset) {
modulePath = resolveCwd(commander.preset);
if (!modulePath) {
console.error(`Unable to resolve "${commander.preset}" preset`);
process.exit(1);
}
} else {
modulePath = resolveCwd(`./${commander.file}`);
if (!modulePath) {
console.error(`Unable to find "${commander.file}" file`);
process.exit(1);
}
}
const tasks = require(modulePath);
what do you think?
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.
Yeah it's redundant. Updated
808bb46
to
fff76b0
Compare
It seems this has been merged and version update to 4.1.1 but not been published to npm yet. Just letting you know in case you forgot to actually publish, unless you meant to publish later which is cool. Also |
oops, published.
that's because the point of Yarn is that you have to control all the dependencies tree "manually", nothing is updated magically. |
ok, now I see the bug. |
Fixes deepsweet/start#24