Skip to main content

IsVscodeEnabled

Checks if VS Code 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 VS Code is enabled.

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

Checks if VS Code integration 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 is enabled.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the operation, used for logging errors if parsing of the environment variable fails.
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 VS Code integration is explicitly enabled via an environment variable, false otherwise. If the environment variable is found but its value cannot be parsed as a boolean, it logs an error and returns false.