Merge pull request #120 from sclaughl/master

Allows Lektor to be installed without prompt by setting env var.
This commit is contained in:
Joseph Nix 2018-01-17 17:19:15 -06:00 committed by GitHub
commit 298522b1f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -41,6 +41,11 @@ if 1:
os.path.join(os.environ['HOME'], '.bin'),
os.path.join(os.environ['HOME'], '.local', 'bin')]
if os.environ.get('LEKTOR_SILENT') == None:
prompt = True
else:
prompt = False
def find_user_paths():
rv = []
for item in os.environ['PATH'].split(':'):
@ -98,7 +103,8 @@ if 1:
print(' and remove this symlink:')
print(' %s' % symlink_path)
print()
get_confirmation()
if prompt:
get_confirmation()
print()
wipe_installation(lib_dir, symlink_path)
@ -144,7 +150,7 @@ if 1:
print(' app: %s' % lib_dir)
print()
get_confirmation()
if prompt: get_confirmation()
for url in json.loads(urlopen(VENV_URL).read().decode('utf-8'))['urls']:
if url['python_version'] == 'source':

View File

@ -44,6 +44,7 @@ get Lektor installed with our installation script:
```
$ curl -sf https://www.getlektor.com/install.sh | sh
```
If you would like to install Lektor without being prompted, set LEKTOR_SILENT before running the prior command.
For Windows you can use the `command prompt`: