Skip to content

Commit

Permalink
[vscode] support for 'pathSeparator' variable substitution,
Browse files Browse the repository at this point in the history
where ${pathSeparator} - / on macOS or linux, \\ on Windows

Signed-off-by: Alex Gilin <[email protected]>
  • Loading branch information
alex-gilin committed Feb 11, 2021
1 parent f1d4690 commit 1e0086f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { injectable, inject } from 'inversify';
import { VariableContribution, VariableRegistry } from './variable';
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
import { CommandService } from '@theia/core/lib/common/command';
import { isWindows } from '@theia/core/lib/common/os';
import { PreferenceService } from '@theia/core/lib/browser/preferences/preference-service';
import { ResourceContextKey } from '@theia/core/lib/browser/resource-context-key';
import { VariableInput } from './variable-input';
Expand Down Expand Up @@ -129,6 +130,10 @@ export class CommonVariableContribution implements VariableContribution {
return undefined;
}
});
variables.registerVariable({
name: 'pathSeparator',
resolve: () => isWindows ? '\\' : '/'
});
}

}

0 comments on commit 1e0086f

Please sign in to comment.