From 77c6fc0881a0738db772a0f486931aef7e3b8f8c Mon Sep 17 00:00:00 2001 From: root Date: Wed, 2 May 2018 08:25:23 +0000 Subject: [PATCH] Fix command ordering for provisioning --- certidude/cli.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/certidude/cli.py b/certidude/cli.py index 429c171..1734575 100755 --- a/certidude/cli.py +++ b/certidude/cli.py @@ -1142,15 +1142,17 @@ def certidude_setup_authority(username, kerberos_keytab, nginx_config, organizat click.echo("Creating directory %s" % subdir) os.makedirs(subdir) - # Copy fonts - click.echo("Copying fonts...") - os.system("rsync -avq /usr/local/lib/node_modules/font-awesome/fonts/ %s/fonts/" % assets_dir) - # Install JavaScript pacakges if skip_packages: click.echo("Not attempting to install packages from NPM as requested...") else: - os.system("npm install --silent -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") + cmd = "npm install --silent -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) + assert os.system(cmd) == 0 + + # Copy fonts + click.echo("Copying fonts...") + os.system("rsync -avq /usr/local/lib/node_modules/font-awesome/fonts/ %s/fonts/" % assets_dir) # Compile nunjucks templates cmd = 'nunjucks-precompile --include ".html$" --include ".ps1$" --include ".sh$" --include ".svg" %s > %s.part' % (static_path, bundle_js)