Skip to content

Commit

Permalink
.envのDEFAULT_ENGINE_INFOSを改行して定義 (VOICEVOX#794)
Browse files Browse the repository at this point in the history
* ➕ dependenciesにdotenvを追加

* 🔧 DEFAULT_ENGINE_INFOSを改行して定義

* 🩹 開発時にdotenvが動いていないっぽかったので修正
  • Loading branch information
MT224244 authored May 2, 2022
1 parent 2088b1e commit e1ab04c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
9 changes: 8 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
DEFAULT_ENGINE_INFOS=[{"key":"074fc39e-678b-4c13-8916-ffca8d505d1d","executionEnabled":true,"executionFilePath":"run.exe","host":"http://127.0.0.1:50021"}]
DEFAULT_ENGINE_INFOS=`[
{
"key": "074fc39e-678b-4c13-8916-ffca8d505d1d",
"executionEnabled": true,
"executionFilePath": "run.exe",
"host": "http://127.0.0.1:50021"
}
]`
VUE_APP_GTM_CONTAINER_ID=GTM-DUMMY
21 changes: 17 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"ajv": "8.6.2",
"core-js": "3.12.1",
"dayjs": "1.10.7",
"dotenv": "16.0.0",
"electron-log": "4.4.1",
"electron-store": "8.0.0",
"electron-window-state": "5.0.3",
Expand Down
3 changes: 1 addition & 2 deletions src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ process.on("unhandledRejection", (reason) => {

// .envから設定をprocess.envに読み込み
const appDirPath = path.dirname(app.getPath("exe"));
const envPath = path.join(appDirPath, ".env");
dotenv.config({ path: envPath });
dotenv.config({ override: true });

protocol.registerSchemesAsPrivileged([
{ scheme: "app", privileges: { secure: true, standard: true, stream: true } },
Expand Down

0 comments on commit e1ab04c

Please sign in to comment.