File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -142,9 +142,12 @@ is not permanent - it will expire after several hours.
142142$ mergin --username john login
143143Password: topsecret
144144Login successful!
145- To set the MERGIN_AUTH variable run:
145+ To set the MERGIN_AUTH variable run in Linux :
146146export MERGIN_AUTH="Bearer ......."
147+ In Windows:
148+ SET MERGIN_AUTH=Bearer .......
147149```
150+ When setting the variable in Windows you do not quote the value.
148151
149152When the MERGIN_AUTH env variable is set (or passed with ` --auth-token ` command line argument),
150153it is possible to run other commands without specifying username/password.
Original file line number Diff line number Diff line change 1111import click
1212import json
1313import os
14+ import platform
1415import sys
1516import time
1617import traceback
@@ -177,7 +178,11 @@ def login(ctx):
177178 if mc is not None :
178179 click .secho ("Login successful!" , fg = "green" )
179180 token = mc ._auth_session ["token" ]
180- click .secho (f'To set the MERGIN_AUTH variable run:\n export MERGIN_AUTH="{ token } "' )
181+ if platform .system () == "Windows" :
182+ hint = f'To set the MERGIN_AUTH variable run:\n set MERGIN_AUTH={ token } '
183+ else :
184+ hint = f'To set the MERGIN_AUTH variable run:\n export MERGIN_AUTH="{ token } "'
185+ click .secho (hint )
181186
182187
183188@cli .command ()
You can’t perform that action at this time.
0 commit comments