fix(windows): fixed issues preventing execution from windows (#2672)
This commit is contained in:
parent
914b0a2642
commit
5df624c6e5
@ -25,7 +25,7 @@ See https://github.com/semantic-release/semantic-release/blob/master/docs/suppor
|
|||||||
|
|
||||||
execa("git", ["--version"])
|
execa("git", ["--version"])
|
||||||
.then(({ stdout }) => {
|
.then(({ stdout }) => {
|
||||||
const gitVersion = findVersions(stdout)[0];
|
const gitVersion = findVersions(stdout, { loose: true })[0];
|
||||||
if (lt(gitVersion, MIN_GIT_VERSION)) {
|
if (lt(gitVersion, MIN_GIT_VERSION)) {
|
||||||
console.error(`[semantic-release]: Git version ${MIN_GIT_VERSION} is required. Found ${gitVersion}.`);
|
console.error(`[semantic-release]: Git version ${MIN_GIT_VERSION} is required. Found ${gitVersion}.`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
@ -52,9 +52,14 @@ export async function loadPlugin({cwd}, name, pluginsPath) {
|
|||||||
? dirname(resolveFrom.silent(__dirname, pluginsPath[name]) || resolveFrom(cwd, pluginsPath[name]))
|
? dirname(resolveFrom.silent(__dirname, pluginsPath[name]) || resolveFrom(cwd, pluginsPath[name]))
|
||||||
: __dirname;
|
: __dirname;
|
||||||
|
|
||||||
// See https://github.com/mysticatea/eslint-plugin-node/issues/250
|
if (!isFunction(name)) {
|
||||||
// eslint-disable-next-line node/no-unsupported-features/es-syntax
|
const file = resolveFrom.silent(basePath, name) || resolveFrom(cwd, name);
|
||||||
return isFunction(name) ? name : (await import(resolveFrom.silent(basePath, name) || resolveFrom(cwd, name))).default;
|
// See https://github.com/mysticatea/eslint-plugin-node/issues/250
|
||||||
|
// eslint-disable-next-line node/no-unsupported-features/es-syntax
|
||||||
|
name = (await import(`file://${file}`)).default;
|
||||||
|
}
|
||||||
|
|
||||||
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function parseConfig(plugin) {
|
export function parseConfig(plugin) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user