Skip to content

Commit

Permalink
Added platform-specific Paths to the file generation
Browse files Browse the repository at this point in the history
Signed-off-by: simonGraband <[email protected]>
  • Loading branch information
sgraband committed Nov 28, 2019
1 parent 227a20c commit 140d5fd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/theia-ecore/src/node/ecore-file-generation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import * as path from "path";

import { FileGenServer } from "../common/generate-protocol";

const os = require('os');

@injectable()
export class EcoreFileGenServer implements FileGenServer, BackendApplicationContribution {
Expand All @@ -39,13 +40,17 @@ export class EcoreFileGenServer implements FileGenServer, BackendApplicationCont

const command = 'java';
const args: string[] = [];
let platformWorkspacePath = workspacePath;
if (os.platform() === 'win32') {
platformWorkspacePath = workspacePath.substr(1);
}

args.push(
'-jar', jarPath,
'-name', name,
'-prefix', prefix,
'-uri', uri,
'-workspacePath', workspacePath.substr(1)
'-workspacePath', platformWorkspacePath
);

return new Promise(resolve => {
Expand Down

0 comments on commit 140d5fd

Please sign in to comment.