Skip to content

Commit

Permalink
Merge pull request #3 from codad5/dev
Browse files Browse the repository at this point in the history
Temporary fix on ENV variable
  • Loading branch information
codad5 committed Dec 29, 2023
2 parents b914cf5 + 40ed5bd commit 541e296
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
VITE_GOOGLE_CLIENT_ID=YOUR_CLIENT_ID
VITE_GOOGLE_CLIENT_SECRET=YOUR_CLIENT_SECRET
PASSWORD=YOUR_PASSWORD


DB_PASSWORD=YOUR_DB_PASSWORD
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "google-task",
"private": true,
"version": "0.0.7",
"version": "0.0.8",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
8 changes: 7 additions & 1 deletion src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use libs::filehelper::{ENV_FILE, initialize_user_files};
fn run_specta() {

println!("Running specta to generate typescript bindings");

#[cfg(debug_assertions)]
ts::export(collect_types![
save_access_token,
Expand All @@ -29,6 +28,13 @@ fn run_specta() {

fn main() {
dotenv::from_filename(ENV_FILE).ok();

// set default DB_PASSWORD env variable if not set
// this is setting is for now till we have a better way to handle this env variable on build
if env::var("DB_PASSWORD").is_err() {
env::set_var("DB_PASSWORD", "password");
}

initialize_user_files();
run_specta();

Expand Down

0 comments on commit 541e296

Please sign in to comment.