Skip to content

Commit 5741e0e

Browse files
committed
sh tasks: Run with set -e
This ensures that the task doesn't continue when an error happened. This is also best practice in bash.
1 parent 26cb2e4 commit 5741e0e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

tasks/install_shell.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/usr/bin/env bash
2+
3+
set -e
4+
25
# Install puppet-agent as a task
36
#
47
# From https://github.com/petems/puppet-install-shell/blob/master/install_puppet_5_agent.sh

tasks/version_shell.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/sh
22

3+
set -e
4+
35
loc=/opt/puppetlabs/puppet/VERSION
46
if test -f $loc; then
57
echo "{\"version\":\"$(cat $loc)\",\"source\":\"${loc}\"}"

0 commit comments

Comments
 (0)