Skip to content

Commit

Permalink
Fixed official VSIX build (#2041)
Browse files Browse the repository at this point in the history
  • Loading branch information
majastrz authored Mar 29, 2021
1 parent 4857aef commit a1a3561
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pipelines/Common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ stages:
displayName: Copy language server for packaging
inputs:
sourceFolder: '$(Pipeline.Workspace)/drop_build_bicep_windows/bicep.LangServer/'
contents: '*.*'
contents: '**'
targetFolder: '$(Build.SourcesDirectory)/src/vscode-bicep/bicepLanguageServer'

- script: npm run test:unit
Expand Down
9 changes: 7 additions & 2 deletions src/vscode-bicep/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ export async function activate(
context,
outputChannel,
async () => {
createLogger(context, outputChannel);
const logger = createLogger(context, outputChannel);

await launchLanguageServiceWithProgressReport(context, outputChannel);
try {
await launchLanguageServiceWithProgressReport(context, outputChannel);
} catch (e) {
logger.error(e);
throw e;
}
}
);
}
Expand Down
4 changes: 3 additions & 1 deletion src/vscode-bicep/src/utils/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function isTestEnv() {
export function createLogger(
context: vscode.ExtensionContext,
outputChannel: vscode.OutputChannel
): void {
): Logger {
// TODO:
// - make log level configurable
// - Default log level should be info
Expand All @@ -102,6 +102,8 @@ export function createLogger(
logger.info("Current log level: debug.");

context.subscriptions.push(winstonLogger);

return logger;
}

export function getLogger(): Logger {
Expand Down

0 comments on commit a1a3561

Please sign in to comment.