File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 1212from roboflow .core .workspace import Workspace
1313from roboflow .util .general import write_line
1414
15- __version__ = "1.0.2 "
15+ __version__ = "1.0.3 "
1616
1717
1818def check_key (api_key , model , notebook , num_retries = 0 ):
@@ -72,9 +72,17 @@ def auth(api_key):
7272
7373
7474def login (workspace = None , force = False ):
75+ os_name = os .name
76+
77+ if os_name == "nt" :
78+ default_path = os .getenv ("USERPROFILE" ) + "\\ roboflow\\ config.json"
79+ else :
80+ default_path = os .getenv ("HOME" ) + "/.config/roboflow/config.json"
81+
82+ # default configuration location
7583 conf_location = os .getenv (
7684 "ROBOFLOW_CONFIG_DIR" ,
77- default = os . getenv ( "HOME" ) + "/.config/roboflow/config.json" ,
85+ default = default_path ,
7886 )
7987
8088 if os .path .isfile (conf_location ) and not force :
Original file line number Diff line number Diff line change @@ -14,10 +14,17 @@ def get_conditional_configuration_variable(key, default):
1414 string: The value of the conditional configuration variable.
1515 """
1616
17+ os_name = os .name
18+
19+ if os_name == "nt" :
20+ default_path = os .getenv ("USERPROFILE" ) + "\\ roboflow\\ config.json"
21+ else :
22+ default_path = os .getenv ("HOME" ) + "/.config/roboflow/config.json"
23+
1724 # default configuration location
1825 conf_location = os .getenv (
1926 "ROBOFLOW_CONFIG_DIR" ,
20- default = os . path . expanduser ( "~" ) + "/.config/roboflow/config.json" ,
27+ default = default_path ,
2128 )
2229
2330 # read config file for roboflow if logged in from python or CLI
You can’t perform that action at this time.
0 commit comments