Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Read <eread@gitlab.com>2020-07-31 05:58:01 +0300
committerEvan Read <eread@gitlab.com>2020-08-04 09:49:30 +0300
commiteef35bd1e3516b6084a6994ffdf674e133f4eab4 (patch)
tree0f1f048f8b677f892c17220f5747f71cf1474d44 /commands
parente9dcecc071ebec022b383c2ca6b3b65e430c017e (diff)
Switch to asdf as preferred dependency manager
Diffstat (limited to 'commands')
-rw-r--r--commands/frontend.rb36
1 files changed, 11 insertions, 25 deletions
diff --git a/commands/frontend.rb b/commands/frontend.rb
index 9c145dee..24d64d4b 100644
--- a/commands/frontend.rb
+++ b/commands/frontend.rb
@@ -8,33 +8,19 @@ flag :h, :help, 'show help for this command' do |value, cmd|
exit 0
end
run do |opts, args, cmd|
+ puts 'Compiling JavaScript...'
+ unless system('yarn install --frozen-lockfile')
+ abort <<~ERROR
+ Error: failed to run yarn. JavaScript compilation failed. For more information, see:
+ https://gitlab.com/gitlab-org/gitlab-docs/blob/master/README.md
- puts '--------------------------------'
-
- if check_requirements?
- puts 'Compiling JavaScript...'
-
- system('yarn install --frozen-lockfile')
-
- system('yarn bundle')
+ ERROR
end
-end
+ unless system('yarn bundle')
+ abort <<~ERROR
+ Error: failed to run yarn. JavaScript compilation failed. For more information, see:
+ https://gitlab.com/gitlab-org/gitlab-docs/blob/master/README.md
-def check_requirements?
- puts 'Checking requirements...'
-
- has_requirements = command_exists?('node') && command_exists?('yarn')
-
- unless has_requirements
- puts 'Your system may be missing some requirements.'
- puts 'Please refer to the installation instructions for more details:'
- puts 'https://gitlab.com/gitlab-org/gitlab-docs/blob/master/README.md'
+ ERROR
end
- has_requirements
-end
-
-def command_exists?(command)
- exists = system("which #{command} > /dev/null 2>&1")
- puts "🚨 #{command} is not installed!" unless exists
- exists
end