| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -283,7 +283,7 @@ | |||
| 283 | 283 | "program": "$${{file}}", | |
| 284 | 284 | "cwd": "$${{workspaceRoot}}", | |
| 285 | 285 | "env": null, | |
| 286 | - "envFile": null, | ||
| 286 | + "envFile": "$${{workspaceRoot}}/.env", | ||
| 287 | 287 | "debugOptions": [ | |
| 288 | 288 | "WaitOnAbnormalExit", | |
| 289 | 289 | "WaitOnNormalExit", | |
@@ -311,7 +311,7 @@ | |||
| 311 | 311 | "program": "$${{file}}", | |
| 312 | 312 | "cwd": "$${{workspaceRoot}}", | |
| 313 | 313 | "env": null, | |
| 314 | - "envFile": null, | ||
| 314 | + "envFile": "$${{workspaceRoot}}/.env", | ||
| 315 | 315 | "debugOptions": [ | |
| 316 | 316 | "WaitOnAbnormalExit", | |
| 317 | 317 | "WaitOnNormalExit", | |
@@ -331,7 +331,7 @@ | |||
| 331 | 331 | "module": "module.name", | |
| 332 | 332 | "cwd": "$${{workspaceRoot}}", | |
| 333 | 333 | "env": null, | |
| 334 | - "envFile": null, | ||
| 334 | + "envFile": "$${{workspaceRoot}}/.env", | ||
| 335 | 335 | "debugOptions": [ | |
| 336 | 336 | "WaitOnAbnormalExit", | |
| 337 | 337 | "WaitOnNormalExit", | |
@@ -352,7 +352,7 @@ | |||
| 352 | 352 | "cwd": "null", | |
| 353 | 353 | "console": "integratedTerminal", | |
| 354 | 354 | "env": null, | |
| 355 | - "envFile": null, | ||
| 355 | + "envFile": "$${{workspaceRoot}}/.env", | ||
| 356 | 356 | "debugOptions": [ | |
| 357 | 357 | "WaitOnAbnormalExit", | |
| 358 | 358 | "WaitOnNormalExit" | |
@@ -372,7 +372,7 @@ | |||
| 372 | 372 | "cwd": "null", | |
| 373 | 373 | "console": "externalTerminal", | |
| 374 | 374 | "env": null, | |
| 375 | - "envFile": null, | ||
| 375 | + "envFile": "$${{workspaceRoot}}/.env", | ||
| 376 | 376 | "debugOptions": [ | |
| 377 | 377 | "WaitOnAbnormalExit", | |
| 378 | 378 | "WaitOnNormalExit" | |
@@ -395,7 +395,7 @@ | |||
| 395 | 395 | "--noreload" | |
| 396 | 396 | ], | |
| 397 | 397 | "env": null, | |
| 398 | - "envFile": null, | ||
| 398 | + "envFile": "$${{workspaceRoot}}/.env", | ||
| 399 | 399 | "debugOptions": [ | |
| 400 | 400 | "WaitOnAbnormalExit", | |
| 401 | 401 | "WaitOnNormalExit", | |
@@ -423,7 +423,7 @@ | |||
| 423 | 423 | "--no-debugger", | |
| 424 | 424 | "--no-reload" | |
| 425 | 425 | ], | |
| 426 | - "envFile": null, | ||
| 426 | + "envFile": "$${{workspaceRoot}}/.env", | ||
| 427 | 427 | "debugOptions": [ | |
| 428 | 428 | "WaitOnAbnormalExit", | |
| 429 | 429 | "WaitOnNormalExit", | |
@@ -444,7 +444,7 @@ | |||
| 444 | 444 | "cwd": "$${{workspaceRoot}}", | |
| 445 | 445 | "args": [], | |
| 446 | 446 | "env": null, | |
| 447 | - "envFile": null, | ||
| 447 | + "envFile": "$${{workspaceRoot}}/.env", | ||
| 448 | 448 | "debugOptions": [ | |
| 449 | 449 | "WaitOnAbnormalExit", | |
| 450 | 450 | "WaitOnNormalExit", | |
@@ -469,7 +469,7 @@ | |||
| 469 | 469 | "--noreload=True" | |
| 470 | 470 | ], | |
| 471 | 471 | "env": null, | |
| 472 | - "envFile": null, | ||
| 472 | + "envFile": "$${{workspaceRoot}}/.env", | ||
| 473 | 473 | "debugOptions": [ | |
| 474 | 474 | "WaitOnAbnormalExit", | |
| 475 | 475 | "WaitOnNormalExit", | |
@@ -651,7 +651,7 @@ | |||
| 651 | 651 | "program": "${file}", | |
| 652 | 652 | "cwd": "${workspaceRoot}", | |
| 653 | 653 | "env": null, | |
| 654 | - "envFile": null, | ||
| 654 | + "envFile": "${workspaceRoot}/.env", | ||
| 655 | 655 | "debugOptions": [ | |
| 656 | 656 | "WaitOnAbnormalExit", | |
| 657 | 657 | "WaitOnNormalExit", | |
@@ -675,7 +675,7 @@ | |||
| 675 | 675 | "program": "${file}", | |
| 676 | 676 | "cwd": "${workspaceRoot}", | |
| 677 | 677 | "env": null, | |
| 678 | - "envFile": null, | ||
| 678 | + "envFile": "${workspaceRoot}/.env", | ||
| 679 | 679 | "debugOptions": [ | |
| 680 | 680 | "WaitOnAbnormalExit", | |
| 681 | 681 | "WaitOnNormalExit", | |
@@ -691,7 +691,7 @@ | |||
| 691 | 691 | "module": "module.name", | |
| 692 | 692 | "cwd": "${workspaceRoot}", | |
| 693 | 693 | "env": null, | |
| 694 | - "envFile": null, | ||
| 694 | + "envFile": "${workspaceRoot}/.env", | ||
| 695 | 695 | "debugOptions": [ | |
| 696 | 696 | "WaitOnAbnormalExit", | |
| 697 | 697 | "WaitOnNormalExit", | |
@@ -708,7 +708,7 @@ | |||
| 708 | 708 | "cwd": "null", | |
| 709 | 709 | "console": "integratedTerminal", | |
| 710 | 710 | "env": null, | |
| 711 | - "envFile": null, | ||
| 711 | + "envFile": "${workspaceRoot}/.env", | ||
| 712 | 712 | "debugOptions": [ | |
| 713 | 713 | "WaitOnAbnormalExit", | |
| 714 | 714 | "WaitOnNormalExit" | |
@@ -724,7 +724,7 @@ | |||
| 724 | 724 | "cwd": "null", | |
| 725 | 725 | "console": "externalTerminal", | |
| 726 | 726 | "env": null, | |
| 727 | - "envFile": null, | ||
| 727 | + "envFile": "${workspaceRoot}/.env", | ||
| 728 | 728 | "debugOptions": [ | |
| 729 | 729 | "WaitOnAbnormalExit", | |
| 730 | 730 | "WaitOnNormalExit" | |
@@ -743,7 +743,7 @@ | |||
| 743 | 743 | "--noreload" | |
| 744 | 744 | ], | |
| 745 | 745 | "env": null, | |
| 746 | - "envFile": null, | ||
| 746 | + "envFile": "${workspaceRoot}/.env", | ||
| 747 | 747 | "debugOptions": [ | |
| 748 | 748 | "WaitOnAbnormalExit", | |
| 749 | 749 | "WaitOnNormalExit", | |
@@ -767,7 +767,7 @@ | |||
| 767 | 767 | "--no-debugger", | |
| 768 | 768 | "--no-reload" | |
| 769 | 769 | ], | |
| 770 | - "envFile": null, | ||
| 770 | + "envFile": "${workspaceRoot}/.env", | ||
| 771 | 771 | "debugOptions": [ | |
| 772 | 772 | "WaitOnAbnormalExit", | |
| 773 | 773 | "WaitOnNormalExit", | |
@@ -784,7 +784,7 @@ | |||
| 784 | 784 | "cwd": "${workspaceRoot}", | |
| 785 | 785 | "args": [], | |
| 786 | 786 | "env": null, | |
| 787 | - "envFile": null, | ||
| 787 | + "envFile": "${workspaceRoot}/.env", | ||
| 788 | 788 | "debugOptions": [ | |
| 789 | 789 | "WaitOnAbnormalExit", | |
| 790 | 790 | "WaitOnNormalExit", | |
@@ -805,7 +805,7 @@ | |||
| 805 | 805 | "--noreload=True" | |
| 806 | 806 | ], | |
| 807 | 807 | "env": null, | |
| 808 | - "envFile": null, | ||
| 808 | + "envFile": "${workspaceRoot}/.env", | ||
| 809 | 809 | "debugOptions": [ | |
| 810 | 810 | "WaitOnAbnormalExit", | |
| 811 | 811 | "WaitOnNormalExit", | |
@@ -836,7 +836,7 @@ | |||
| 836 | 836 | "python.envFile": { | |
| 837 | 837 | "type": "string", | |
| 838 | 838 | "description": "Absolute path to a file containing environment variable definitions.", | |
| 839 | - "default": null | ||
| 839 | + "default": "${workspaceRoot}/.env}" | ||
| 840 | 840 | }, | |
| 841 | 841 | "python.jediPath": { | |
| 842 | 842 | "type": "string", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -281,7 +281,10 @@ export function getCustomEnvVars(): any { | |||
| 281 | 281 | fs.existsSync(envFile)) { | |
| 282 | 282 | ||
| 283 | 283 | try { | |
| 284 | - return parseEnvFile(envFile); | ||
| 284 | + let vars = parseEnvFile(envFile); | ||
| 285 | + if (vars && typeof vars === 'object' && Object.keys(vars).length > 0) { | ||
| 286 | + return vars; | ||
| 287 | + } | ||
| 285 | 288 | } | |
| 286 | 289 | catch (ex) { | |
| 287 | 290 | console.error('Failed to load env file'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -131,15 +131,19 @@ export function getCustomEnvVars(envVars: any, envFile: string): any { | |||
| 131 | 131 | console.error(ex); | |
| 132 | 132 | } | |
| 133 | 133 | } | |
| 134 | - | ||
| 134 | + let configVars = null; | ||
| 135 | 135 | if (envVars && envFileVars) { | |
| 136 | - return mergeEnvVariables(envVars, envFileVars); | ||
| 136 | + configVars = mergeEnvVariables(envVars, envFileVars); | ||
| 137 | 137 | } | |
| 138 | 138 | if (envVars) { | |
| 139 | - return envVars; | ||
| 139 | + configVars = envVars; | ||
| 140 | 140 | } | |
| 141 | 141 | if (envFileVars) { | |
| 142 | - return envFileVars; | ||
| 142 | + configVars = envFileVars; | ||
| 143 | + } | ||
| 144 | + if (configVars && typeof configVars === 'object' && Object.keys(configVars).length > 0) { | ||
| 145 | + return configVars; | ||
| 143 | 146 | } | |
| 147 | + | ||
| 144 | 148 | return null; | |
| 145 | 149 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments