Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/package/src/ext/installer.ts
6450 views
1
/*
2
* installer.ts
3
*
4
* Copyright (C) 2020-2022 Posit Software, PBC
5
*
6
*/
7
8
import { join } from "../../../src/deno_ral/path.ts";
9
import { copySync } from "../../../src/deno_ral/fs.ts";
10
import { info } from "../../../src/deno_ral/log.ts";
11
12
import { Configuration } from "../common/config.ts";
13
14
export async function makeInstallerExternal(
15
configuration: Configuration,
16
) {
17
info("Copying Quarto files...");
18
19
// It's expected that the external build tool will set QUARTO_DIST_PATH.
20
const workingBinPath = join(configuration.directoryInfo.dist, "bin");
21
copySync(configuration.directoryInfo.pkgWorking.bin, workingBinPath, {
22
overwrite: true,
23
});
24
25
// The assumption here is that you're installing to a shared location. The probability of a namespace conflict is pretty high.
26
// Thus, we nest the share contents in a quarto folder. At runtime, the QUARTO_SHARE_PATH env var accounts for this.
27
const workingSharePath = join( configuration.directoryInfo.dist, "share", "quarto");
28
copySync(configuration.directoryInfo.pkgWorking.share, workingSharePath, {
29
overwrite: true,
30
});
31
}
32
33