Skip to content

Commit

Permalink
feat: starting server on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
gp-pereira committed Nov 23, 2024
1 parent 2e107be commit d99bc2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ export function deactivate(): Thenable<void> | undefined {

function ensureServerCompiled(serverPath: string): Promise<void> {
const compilationPath = path.join(serverPath, "_build", "prod");
const compileCommand = `cd ${serverPath} && mix deps.get && mix compile`;
const compileCommand = `cd ${serverPath} && mix local.hex --force && mix deps.get && mix compile`;

const command =
process.platform === "win32"
? `if not exist ${compilationPath} (set MIX_ENV=prod && ${compileCommand})`
? `if not exist ${compilationPath} (set MIX_ENV=prod&& ${compileCommand})`
: `[ ! -d "${compilationPath}" ] && (export MIX_ENV=prod && ${compileCommand}) || true`;

return new Promise((resolve, reject) => {
Expand Down

0 comments on commit d99bc2a

Please sign in to comment.