# HG changeset patch # User wenzelm # Date 1496146902 -7200 # Node ID 05e317e291a8f8768acd3c9a142a15009fb60a36 # Parent 1f93eb5c3d770dfcea597cd74b076d2bd5440c9d clarified modules; diff -r 1f93eb5c3d77 -r 05e317e291a8 src/Tools/VSCode/extension/src/extension.ts --- a/src/Tools/VSCode/extension/src/extension.ts Tue May 30 11:54:53 2017 +0200 +++ b/src/Tools/VSCode/extension/src/extension.ts Tue May 30 14:21:42 2017 +0200 @@ -3,7 +3,6 @@ import { ExtensionContext, workspace, window } from 'vscode'; import * as path from 'path'; import * as fs from 'fs'; -import * as os from 'os'; import * as library from './library' import * as decorations from './decorations'; import * as preview from './preview'; @@ -16,8 +15,6 @@ export function activate(context: ExtensionContext) { - const is_windows = os.type().startsWith("Windows") - const isabelle_home = library.get_configuration("home") const isabelle_args = library.get_configuration>("args") const cygwin_root = library.get_configuration("cygwin_root") @@ -32,7 +29,7 @@ const standard_args = ["-o", "vscode_unicode_symbols", "-o", "vscode_pide_extensions"] const server_options: ServerOptions = - is_windows ? + library.platform_is_windows() ? { command: (cygwin_root === "" ? path.join(isabelle_home, "contrib", "cygwin") : cygwin_root) + "/bin/bash", diff -r 1f93eb5c3d77 -r 05e317e291a8 src/Tools/VSCode/extension/src/library.ts --- a/src/Tools/VSCode/extension/src/library.ts Tue May 30 11:54:53 2017 +0200 +++ b/src/Tools/VSCode/extension/src/library.ts Tue May 30 14:21:42 2017 +0200 @@ -1,8 +1,17 @@ 'use strict'; +import * as os from 'os'; import { ViewColumn, TextEditor, workspace } from 'vscode' +/* platform information */ + +export function platform_is_windows(): boolean +{ + return os.type().startsWith("Windows") +} + + /* Isabelle configuration */ export function get_configuration(name: string): T