Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/7344 #7398

Merged
merged 2 commits into from Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/core/resources.ts
Expand Up @@ -29,13 +29,13 @@ export function formatResourcePath(format: string, resource: string) {
return join(resourcePath("formats"), format, resource);
}

export function architectureToolsPath(path: string) {
export function architectureToolsPath(binary: string) {
const arch = Deno.build.arch;
const archDir = join(arch, path);
return toolsPath(archDir);
const archBinaryPath = join(arch, binary);
return toolsPath(binary, archBinaryPath);
}

export function toolsPath(binary: string): string {
export function toolsPath(binary: string, defaultPath?: string): string {
const displayWarning = () => {
warnOnce(
`Specified ${binaryEnvKey} does not exist, using built in ${binary}`,
Expand Down Expand Up @@ -72,8 +72,7 @@ export function toolsPath(binary: string): string {
}
}
}

return join(quartoConfig.toolsPath(), binary);
return join(quartoConfig.toolsPath(), defaultPath || binary);
}

export function pandocBinaryPath(): string {
Expand Down
6 changes: 1 addition & 5 deletions src/core/run/deno.ts
Expand Up @@ -8,11 +8,7 @@ import { existsSync, expandGlobSync } from "fs/mod.ts";
import { extname, join, normalize } from "path/mod.ts";
import { quartoCacheDir } from "../appdirs.ts";
import { execProcess } from "../process.ts";
import {
architectureToolsPath,
resourcePath,
toolsPath,
} from "../resources.ts";
import { architectureToolsPath, resourcePath } from "../resources.ts";
import { RunHandler, RunHandlerOptions } from "./types.ts";
import { removeIfExists } from "../path.ts";
import { copyTo } from "../copy.ts";
Expand Down