mirror of
https://github.com/laurivosandi/certidude
synced 2024-12-22 16:25:17 +00:00
Fix JavaScript packages installation
This commit is contained in:
parent
e41f284b0e
commit
4f1e76935e
@ -1030,7 +1030,7 @@ def certidude_setup_authority(username, kerberos_keytab, nginx_config, tls_confi
|
|||||||
env = Environment(loader=PackageLoader("certidude", "templates"), trim_blocks=True)
|
env = Environment(loader=PackageLoader("certidude", "templates"), trim_blocks=True)
|
||||||
|
|
||||||
if skip_packages:
|
if skip_packages:
|
||||||
click.echo("Not attempting to install packages from APT as requested...")
|
click.echo("Not attempting to install packages as requested...")
|
||||||
else:
|
else:
|
||||||
click.echo("Installing packages...")
|
click.echo("Installing packages...")
|
||||||
cmd = "DEBIAN_FRONTEND=noninteractive apt-get install -qq -y \
|
cmd = "DEBIAN_FRONTEND=noninteractive apt-get install -qq -y \
|
||||||
@ -1065,6 +1065,11 @@ def certidude_setup_authority(username, kerberos_keytab, nginx_config, tls_confi
|
|||||||
else:
|
else:
|
||||||
click.echo("Web server nginx already installed")
|
click.echo("Web server nginx already installed")
|
||||||
|
|
||||||
|
cmd = "npm install --silent --no-optional -g nunjucks@2.5.2 nunjucks-date@1.2.0 node-forge bootstrap@4.0.0-alpha.6 jquery timeago tether font-awesome qrcode-svg"
|
||||||
|
click.echo("Installing JavaScript packages: %s" % cmd)
|
||||||
|
if os.system(cmd):
|
||||||
|
raise click.ClickException("Failed to install JavaScript packages")
|
||||||
|
|
||||||
if not os.path.exists("/usr/bin/node"):
|
if not os.path.exists("/usr/bin/node"):
|
||||||
os.symlink("/usr/bin/nodejs", "/usr/bin/node")
|
os.symlink("/usr/bin/nodejs", "/usr/bin/node")
|
||||||
|
|
||||||
@ -1193,13 +1198,6 @@ def certidude_setup_authority(username, kerberos_keytab, nginx_config, tls_confi
|
|||||||
click.echo("Creating directory %s" % subdir)
|
click.echo("Creating directory %s" % subdir)
|
||||||
os.makedirs(subdir)
|
os.makedirs(subdir)
|
||||||
|
|
||||||
# Install JavaScript pacakges
|
|
||||||
if skip_packages:
|
|
||||||
click.echo("Not attempting to install packages from NPM as requested...")
|
|
||||||
else:
|
|
||||||
cmd = "npm install --silent --no-optional -g nunjucks@2.5.2 nunjucks-date@1.2.0 node-forge bootstrap@4.0.0-alpha.6 jquery timeago tether font-awesome qrcode-svg"
|
|
||||||
click.echo("Installing JavaScript packages: %s" % cmd)
|
|
||||||
|
|
||||||
if skip_assets:
|
if skip_assets:
|
||||||
click.echo("Not attempting to assemble assets as requested...")
|
click.echo("Not attempting to assemble assets as requested...")
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user