Skip to main content

IsVscodeEnabled

Checks if VSCode is enabled based on the provided environment variables. It iterates through the environment variables, looking for FlyteEnableVscode, and parses its boolean value to determine if VSCode is enabled.

def IsVscodeEnabled(
ctx: context.Context,
envVar: []v1.EnvVar
) - > bool

Checks if VS Code is enabled based on the provided environment variables. This function iterates through a list of environment variables to find a specific flag that indicates whether VS Code integration should be active.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the operation, used for logging errors if the environment variable value cannot be parsed.
envVar[]v1.EnvVarA slice of environment variables to search through. The function looks for an environment variable named 'FlyteEnableVscode' within this slice.

Returns

TypeDescription
boolReturns true if the 'FlyteEnableVscode' environment variable is found and its value is parsed as true; otherwise, returns false.