This repository was archived by the owner on May 11, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
120120
121121 // append any additional tutorials if we have them
122122 await extensionFunctions . sendTextToOutputChannel ( `--Appending any additional tutorials if we have them` ) ;
123- const appendTutorialsAtStartup : string | undefined = await getAppendRegisteredSettingFromEnv ( ) ;
123+ const appendTutorialsAtStartup : string | undefined = getAppendRegisteredSettingFromEnv ( ) ;
124124 await extensionFunctions . sendTextToOutputChannel ( `--Got this from env: ${ appendTutorialsAtStartup } ` ) ;
125125 await appendAdditionalTutorialsFromEnv ( ) ;
126126
Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ suite('Didact registry test suite', () => {
129129 const tutName = `AppendMe2` ;
130130 await appendAdditionalTutorialsFromEnv ( ) ;
131131 const foundTutorial = verifyTutorialInRegistry ( tutName ) ;
132+ getContext ( ) . environmentVariableCollection . delete ( DIDACT_APPEND_REGISTERED_SETTING ) ;
132133 assert . ok ( foundTutorial , `Did not find ${ tutName } registered after appending to tutorial list from settings` ) ;
133134 } ) ;
134135
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export const DIDACT_OPEN_AT_STARTUP = 'didact.openDefaultTutorialAtStartup';
3030export const DIDACT_AUTO_INSTALL_DEFAULT_TUTORIALS = 'didact.autoAddDefaultTutorials' ;
3131export const DIDACT_CLI_LINK_LF_SETTING = 'didact.edit.cliLinkLF' ;
3232export const DIDACT_CLI_LINK_TEXT_SETTING = 'didact.edit.cliLinkText' ;
33- export const DIDACT_APPEND_REGISTERED_SETTING = 'didact.append.registry ' ;
33+ export const DIDACT_APPEND_REGISTERED_SETTING = 'DIDACT_APPEND_REGISTRY ' ;
3434
3535const CACHED_OUTPUT_CHANNELS : OutputChannel [ ] = new Array < OutputChannel > ( ) ;
3636
@@ -502,7 +502,7 @@ export function getFileExtension(pathAsString: string) : string | undefined {
502502 return undefined ;
503503}
504504
505- export async function getAppendRegisteredSettingFromEnv ( ) : Promise < string | undefined > {
505+ export function getAppendRegisteredSettingFromEnv ( ) : string | undefined {
506506 const envVar = extensionFunctions . getContext ( ) . environmentVariableCollection . get ( DIDACT_APPEND_REGISTERED_SETTING ) ;
507507 if ( ! envVar ) {
508508 return ;
@@ -512,7 +512,7 @@ export async function getAppendRegisteredSettingFromEnv() : Promise<string | und
512512
513513export async function appendAdditionalTutorialsFromEnv ( ) : Promise < void > {
514514 try {
515- const appendTutorialsAtStartup : string | undefined = await getAppendRegisteredSettingFromEnv ( ) ;
515+ const appendTutorialsAtStartup : string | undefined = getAppendRegisteredSettingFromEnv ( ) ;
516516 if ( appendTutorialsAtStartup ) {
517517 await extensionFunctions . sendTextToOutputChannel ( `Didact tutorials appended at startup via ${ DIDACT_APPEND_REGISTERED_SETTING } with ${ appendTutorialsAtStartup } ` ) ;
518518 const jsonTutorials = JSON . parse ( appendTutorialsAtStartup ) ;
You can’t perform that action at this time.
0 commit comments