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"])
|
||||
.then(({ stdout }) => {
|
||||
const gitVersion = findVersions(stdout)[0];
|
||||
const gitVersion = findVersions(stdout, { loose: true })[0];
|
||||
if (lt(gitVersion, MIN_GIT_VERSION)) {
|
||||
console.error(`[semantic-release]: Git version ${MIN_GIT_VERSION} is required. Found ${gitVersion}.`);
|
||||
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;
|
||||
|
||||
if (!isFunction(name)) {
|
||||
const file = resolveFrom.silent(basePath, name) || resolveFrom(cwd, name);
|
||||
// See https://github.com/mysticatea/eslint-plugin-node/issues/250
|
||||
// eslint-disable-next-line node/no-unsupported-features/es-syntax
|
||||
return isFunction(name) ? name : (await import(resolveFrom.silent(basePath, name) || resolveFrom(cwd, name))).default;
|
||||
name = (await import(`file://${file}`)).default;
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
export function parseConfig(plugin) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user