Skip to content

Commit

Permalink
Build
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrisbin committed Feb 13, 2024
1 parent 06c3bb1 commit c68bcc8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,11 +488,20 @@ exports.parseStackYaml = parseStackYaml;
async function getStackDirectories(stackYaml, stack, workingDirectory) {
const cwd = workingDirectory ?? process.cwd();
const stackRoot = (await stack.read(["path", "--stack-root"])).trim();
const stackPrograms = (await stack.read(["path", "--programs"])).trim();
const stackPrograms = stackYaml["local-programs-path"] ?? defaultLocalProgramsPath(stackRoot);
const stackWorks = packagesStackWorks(stackYaml, cwd);
return { stackRoot, stackPrograms, stackWorks };
}
exports.getStackDirectories = getStackDirectories;
function defaultLocalProgramsPath(stackRoot) {
if (process.platform === "win32") {
const localAppData = process.env["%LOCALAPPDATA%"];
if (localAppData) {
return (0, path_1.join)(localAppData, "Programs", "stack");
}
}
return (0, path_1.join)(stackRoot, "programs");
}
function packagesStackWorks(stackYaml, cwd) {
const packageStackWorks = (stackYaml.packages ?? [])
.filter((p) => p !== ".")
Expand Down

0 comments on commit c68bcc8

Please sign in to comment.