Skip to content

Commit

Permalink
enable load env from other folder instead of just solution root folder (
Browse files Browse the repository at this point in the history
  • Loading branch information
adashen authored May 17, 2019
1 parent 3eb0404 commit 337103a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "azure-iot-edge",
"displayName": "Azure IoT Edge",
"description": "Develop, deploy, debug, and manage your IoT Edge solution",
"version": "1.13.0-rc",
"version": "1.13.0-rc1",
"publisher": "vsciot-vscode",
"aiKey": "95b20d64-f54f-4de3-8ad5-165a75a6c6fe",
"icon": "logo.png",
Expand Down
5 changes: 2 additions & 3 deletions src/common/utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,8 @@ export class Utility {
if (!workspaceFolder) {
return;
}
const directory = path.dirname(envFilePath);
// Check whether .env file is in the root folder of solution
if (await fse.pathExists(path.join(directory, Constants.deploymentTemplate)) && await fse.pathExists(envFilePath)) {

if (await fse.pathExists(envFilePath)) {
TelemetryClient.sendEvent("envFileDetected");
const envConfig = dotenv.parse(await fse.readFile(envFilePath));
for (const k of Object.keys(envConfig)) {
Expand Down

0 comments on commit 337103a

Please sign in to comment.