Skip to content

Commit 255e97a

Browse files
committed
Fix downloads
1 parent 6e78a8a commit 255e97a

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/run-all-unit-tests.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ jobs:
4848
touch ~/.zshrc
4949
unset JAVA_HOME
5050
export PATH=/Users/runner/.local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/usr/bin:/bin:/usr/sbin:/sbin
51+
export CI=true
5152
52-
npm run test -- ./test/xcode-tools ./test/vscode ./test/macports --no-file-parallelism --disable-console-intercept
53+
npm run test -- ./test/xcode-tools ./test/vscode ./test/macports ./test/docker --no-file-parallelism --disable-console-intercept
5354
5455
- name: Run tests (Linux)
5556
if: runner.os == 'Linux'

src/resources/docker/docker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export class DockerResource extends Resource<DockerConfig> {
7272
const downloadLink = await Utils.isArmArch() ? ARM_DOWNLOAD_LINK : INTEL_DOWNLOAD_LINK;
7373

7474
const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), 'codify-docker'))
75-
await FileUtils.downloadFile(path.join(tmpDir, 'Docker.dmg'), downloadLink);
75+
await FileUtils.downloadFile(downloadLink, path.join(tmpDir, 'Docker.dmg'));
7676
const user = Utils.getUser();
7777

7878
try {

src/resources/macports/macports.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export class MacportsResource extends Resource<MacportsConfig> {
6565
const installerPath = path.join(tmpDir, 'installer.pkg')
6666

6767
console.log(`Downloading macports installer ${installerUrl}`)
68-
await FileUtils.downloadFile(installerPath, installerUrl);
68+
await FileUtils.downloadFile(installerUrl, installerPath);
6969

7070
await $.spawn(`installer -pkg "${installerPath}" -target /;`, { requiresRoot: true })
7171

test/xcode-tools/xcode-tools.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Utils } from '@codifycli/plugin-core';
55

66
const pluginPath = path.resolve('./src/index.ts');
77

8-
describe('XCode tools install tests', { skip: !Utils.isMacOS() }, async () => {
8+
describe('XCode tools install tests', { skip: !Utils.isMacOS() || process.env.CI }, async () => {
99
it('Can uninstall xcode tools', { timeout: 300_000 }, async () => {
1010
await PluginTester.uninstall(pluginPath, [{
1111
type: 'xcode-tools'

0 commit comments

Comments
 (0)