mirror of
https://github.com/hrfee/jellyfin-accounts.git
synced 2026-07-26 12:01:42 +00:00
potential fixes for windows
hopefully fixes scss and email generation on windows by fixing runcmd() and (optionally) reading npm bin location from the 'npm bin' command. also, config path is cast to string before being passed to configparser.
This commit is contained in:
@@ -1,14 +1,22 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import subprocess
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def runcmd(cmd):
|
||||
if os.name == "nt":
|
||||
return subprocess.check_output(cmd, shell=True)
|
||||
proc = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE)
|
||||
return proc.communicate()
|
||||
|
||||
|
||||
print('Installing npm packages')
|
||||
|
||||
if os.name == "nt":
|
||||
print("Note: npm on windows installs all packages in the root directory, so things might get ugly.")
|
||||
|
||||
root_path = Path(__file__).parents[1]
|
||||
runcmd(f'npm install --prefix {root_path}')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user