teldrive icon indicating copy to clipboard operation
teldrive copied to clipboard

[Bug]: `teldrive run` fails to run correctly after adding the executable to the system environment variables on Windows

Open welovfree opened this issue 10 months ago • 3 comments

Describe the bug

When I run teldrive run directly from the release folder it runs perfectly fine, but when I run it outside the release folder it produces the following error Error: required configuration values not set: jwt-secret, db-data-source, tg-uploads-encryption-key even though I did add teldrive.exe to the system environment variables.

And since teldrive run gives no error when run inside the release folder, I think the config.toml is correctly configured, otherwise it won't run.

Repoduction

  1. Add E:\PC Backups\teldrive\teldrive-1.6.12-windows-amd64 to the system environment variables.
  2. Run teldrive run.
  3. Get the Error: required configuration values not set: jwt-secret, db-data-source, tg-uploads-encryption-key error.

Expected behavior

Teldrive running with no errors.

Version

1.6.12

Which Platform are you using?

Windows

Additional context

The bug reproduced here

welovfree avatar Feb 19 '25 17:02 welovfree

just specify where the config is. look at the flags in the help, do --config path/to/config.toml teldrive.exe being in path doesn't magically make it able to figure out where the config.toml is windows runs it with the context of the folder you're in.

BenjiThatFoxGuy avatar Feb 20 '25 17:02 BenjiThatFoxGuy

just specify where the config is. look at the flags in the help, do --config path/to/config.toml teldrive.exe being in path doesn't magically make it able to figure out where the config.toml is windows runs it with the context of the folder you're in.

But I used to run teldrive.exe using that method when I used version v1.5.5 and it did indeed figure out that the config.toml configuration file reisides in the same folder as teldrive.exe.

welovfree avatar Feb 20 '25 21:02 welovfree

you can save the next to a bat file and run it from anywhere. change the config file location accordingly to your file location

@echo off powershell -Command "teldrive run -c 'c:\teledrive\config.toml'" pause

morganxyx avatar Jul 03 '25 10:07 morganxyx