Fix CI: pnpm PATH, Obsidian arch matcher, Arch pkg names, Fedora lazygit COPR
- post.go: export PNPM_HOME+PATH before pnpm add -g so global bins install correctly in the non-interactive shell. Applied to installNpmPackage and installPlaywright (incl. browser install). - system.go: treat token-less Obsidian AppImage as x86_64 (upstream publishes "Obsidian-X.Y.Z.AppImage" with no arch suffix). - pkgmgr.go: docker-ce-rootless-extras and vagrant are AUR-only on Arch → skipOverride; pipx → python-pipx on pacman. - repos.go: new setupLazygitCoprRepo enables copr.fedorainfracloud.org/ dejan/lazygit on Fedora; wired into repoGroups so lazygit installs. - Tests: PNPM_HOME export (Linux+macOS), token-less Obsidian asset, pacman pkg overrides, COPR repo setup, updated repoGroups count. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -361,6 +361,25 @@ func TestInstallPipAgyNpm(t *testing.T) {
|
||||
if len(runShellCmds) < 1 || !strings.Contains(runShellCmds[len(runShellCmds)-1], "pnpm add -g my-package") {
|
||||
t.Errorf("unexpected npm install command: %v", runShellCmds)
|
||||
}
|
||||
if !strings.Contains(runShellCmds[len(runShellCmds)-1], `PNPM_HOME=`) {
|
||||
t.Errorf("expected PNPM_HOME export, got: %v", runShellCmds)
|
||||
}
|
||||
|
||||
// macOS uses ~/Library/pnpm
|
||||
resetMocks()
|
||||
isMacOS = true
|
||||
runShellCmds = nil
|
||||
runShell = func(cmd string, opts CmdOpts) CmdResult {
|
||||
runShellCmds = append(runShellCmds, cmd)
|
||||
return CmdResult{ExitCode: 0}
|
||||
}
|
||||
osStat = func(name string) (os.FileInfo, error) {
|
||||
return nil, nil
|
||||
}
|
||||
installNpmPackage("my-package")
|
||||
if len(runShellCmds) < 1 || !strings.Contains(runShellCmds[len(runShellCmds)-1], `Library/pnpm`) {
|
||||
t.Errorf("expected macOS PNPM_HOME path, got: %v", runShellCmds)
|
||||
}
|
||||
}
|
||||
|
||||
func TestEnsurePythonAndNode(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user