Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
681a9f7e61 | ||
|
|
8335a2b1ba | ||
|
|
407425ca78 | ||
|
|
6ca505b4cd | ||
|
|
612eae5e21 | ||
|
|
497b5ea1eb | ||
|
|
cd384e0d59 | ||
|
|
8921cac35b | ||
|
|
6042783e82 | ||
|
|
b7b3a9f898 | ||
|
|
15643dcb3f |
13
Changelog.md
13
Changelog.md
@@ -1,3 +1,16 @@
|
||||
## 0.55.0 (2012-08-14)
|
||||
|
||||
* use a forked process to exec a run with environment [David Dollar]
|
||||
|
||||
## 0.54.0 (2012-08-14)
|
||||
|
||||
* use Foreman::Process to extract command running [David Dollar]
|
||||
* changed to check env for bash [brntbeer]
|
||||
|
||||
## 0.53.0 (2012-07-24)
|
||||
|
||||
* put app root in $HOME [David Dollar]
|
||||
|
||||
## 0.52.0 (2012-07-24)
|
||||
|
||||
* wrap command in a runner that sources .profile.d scripts [David Dollar]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
foreman (0.53.0)
|
||||
foreman (0.56.0)
|
||||
thor (>= 0.13.6)
|
||||
|
||||
GEM
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
#/ Usage: foreman-runner [-d <dir>] [-p] <command> [<args>...]
|
||||
#/
|
||||
@@ -16,12 +16,12 @@ usage() {
|
||||
exit
|
||||
}
|
||||
|
||||
read_profiled=""
|
||||
read_profile=""
|
||||
|
||||
while getopts ":hd:p" OPT; do
|
||||
case $OPT in
|
||||
d) cd "$OPTARG" ;;
|
||||
p) read_profiled="1" ;;
|
||||
p) read_profile="1" ;;
|
||||
h) usage ;;
|
||||
\?) error "invalid option: -$OPTARG" ;;
|
||||
:) error "option -$OPTARG requires an argument" ;;
|
||||
@@ -32,13 +32,10 @@ shift $((OPTIND-1))
|
||||
|
||||
[ -z "$1" ] && usage
|
||||
|
||||
if [ "$read_profiled" == "1" ]; then
|
||||
shopt -s nullglob
|
||||
for script in .profile.d/*; do
|
||||
echo "sourcing $script"
|
||||
source $script
|
||||
done
|
||||
shopt -u nullglob
|
||||
if [ "$read_profile" == "1" ]; then
|
||||
if [ -f .profile ]; then
|
||||
source .profile
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
@@ -75,13 +75,17 @@ class Foreman::CLI < Thor
|
||||
|
||||
def run(*args)
|
||||
load_environment!
|
||||
begin
|
||||
exec engine.env, args.shelljoin
|
||||
rescue Errno::EACCES
|
||||
error "not executable: #{args.first}"
|
||||
rescue Errno::ENOENT
|
||||
error "command not found: #{args.first}"
|
||||
pid = fork do
|
||||
begin
|
||||
engine.env.each { |k,v| ENV[k] = v }
|
||||
exec args.shelljoin
|
||||
rescue Errno::EACCES
|
||||
error "not executable: #{args.first}"
|
||||
rescue Errno::ENOENT
|
||||
error "command not found: #{args.first}"
|
||||
end
|
||||
end
|
||||
Process.wait(pid)
|
||||
end
|
||||
|
||||
desc "version", "Display Foreman gem version"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module Foreman
|
||||
|
||||
VERSION = "0.53.0"
|
||||
VERSION = "0.56.0"
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user