Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/morphcloud-client-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Validate tag version
id: version
run: |
TAG_VERSION="${GITHUB_REF#refs/tags/typescript-client-v}"
TAG_VERSION="${GITHUB_REF#refs/tags/morphcloud-client-v}"
PACKAGE_VERSION=$(node -p "require('./package.json').version")

echo "Tag version: $TAG_VERSION"
Expand All @@ -47,7 +47,6 @@ jobs:
echo "VERSION=$PACKAGE_VERSION" >> $GITHUB_OUTPUT

- name: Install dependencies
working-directory: clients/typescript
run: npm install

- name: Build
Expand All @@ -59,8 +58,8 @@ jobs:
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: typescript-client-v${{ steps.version.outputs.VERSION }}
name: TypeScript Client v${{ steps.version.outputs.VERSION }}
tag_name: morphcloud-client-v${{ steps.version.outputs.VERSION }}
name: Morph Cloud Client v${{ steps.version.outputs.VERSION }}
body: |
Published package [@nuanced-dev/lsp-morphcloud](https://www.npmjs.com/package/@nuanced-dev/lsp-morphcloud) to NPM.

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/typescript-client-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ jobs:
echo "VERSION=$PACKAGE_VERSION" >> $GITHUB_OUTPUT

- name: Install dependencies
working-directory: clients/typescript
run: npm install

- name: Build
Expand Down
3 changes: 0 additions & 3 deletions clients/morphcloud/bin/mutagen/darwin_arm64/mutagen

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions clients/morphcloud/bin/mutagen/darwin_x64/mutagen

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions clients/morphcloud/bin/mutagen/windows_x64/mutagen.exe

This file was deleted.

14 changes: 11 additions & 3 deletions clients/morphcloud/src/util/mutagen.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { join } from "path";
import { platform, arch } from "os";
import { mkdir } from "fs/promises";
import { mkdir, access } from "fs/promises";
import { Instance } from "morphcloud";
import { spawn } from "child-process-promise";
import { ensureConfigDirectory } from "./config.js";
Expand Down Expand Up @@ -104,7 +104,7 @@ export class MutagenClient {
const mutagenDataDir = join(await ensureConfigDirectory(), "mutagen");
await mkdir(mutagenDataDir, { recursive: true });

const spawnCommand = getMutagenBinaryPath();
const spawnCommand = await getMutagenBinaryPath();
const spawnArgs = [...args];
const spawnEnv = {
...opts?.env,
Expand All @@ -120,7 +120,7 @@ export class MutagenClient {
}
}

function getMutagenBinaryPath(): string {
async function getMutagenBinaryPath(): Promise<string> {
const platformArch = `${platform()}_${arch()}`;
const binaryName = platform() === "win32" ? "mutagen.exe" : "mutagen";
const binPath = join(
Expand All @@ -133,5 +133,13 @@ function getMutagenBinaryPath(): string {
binaryName,
);

try {
await access(binPath);
} catch {
throw new Error(
`Mutagen not supported for platform ${platform()} and architecture ${arch()}. Missing ${binPath}.`,
);
}

return binPath;
}