mirror of
https://github.com/hansjone/netxops.git
synced 2026-10-19 23:03:33 +08:00
Harden public package installation and release validation
This commit is contained in:
parent
9271494b37
commit
9b2166e5b6
41 changed files with 994 additions and 363 deletions
|
|
@ -132,11 +132,12 @@ function opsSkillsRoot() {
|
|||
if (envRoot && existsSync(envRoot))
|
||||
return envRoot;
|
||||
const here = dirname(fileURLToPath(import.meta.url));
|
||||
const checkout = [join(here, "..", ".git"), join(here, "..", "..", ".git")].some(existsSync);
|
||||
const siblingCandidates = [
|
||||
join(here, "..", "..", "..", "netx", "skills"),
|
||||
join(here, "..", "..", "netx", "skills")
|
||||
];
|
||||
for (const candidate of siblingCandidates) {
|
||||
for (const candidate of checkout ? siblingCandidates : []) {
|
||||
if (existsSync(candidate))
|
||||
return candidate;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue