Compare commits

...
6 Commits
Author SHA1 Message Date
David Dollar 681a9f7e61 0.56.0 2012-08-19 12:05:07 -04:00
David Dollar 8335a2b1ba read .profile, not .profile.d 2012-08-16 12:57:22 -04:00
David Dollar 407425ca78 update changelog 2012-08-14 17:08:14 -04:00
David Dollar 6ca505b4cd 0.55.0 2012-08-14 17:07:52 -04:00
David Dollar 612eae5e21 use a forked process to exec a run with environment 2012-08-14 17:07:39 -04:00
David Dollar 497b5ea1eb update changelog 2012-08-14 17:03:28 -04:00
5 changed files with 27 additions and 18 deletions
+9
View File
@@ -1,3 +1,12 @@
## 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) ## 0.53.0 (2012-07-24)
* put app root in $HOME [David Dollar] * put app root in $HOME [David Dollar]
+1 -1
View File
@@ -1,7 +1,7 @@
PATH PATH
remote: . remote: .
specs: specs:
foreman (0.54.0) foreman (0.56.0)
thor (>= 0.13.6) thor (>= 0.13.6)
GEM GEM
+6 -9
View File
@@ -16,12 +16,12 @@ usage() {
exit exit
} }
read_profiled="" read_profile=""
while getopts ":hd:p" OPT; do while getopts ":hd:p" OPT; do
case $OPT in case $OPT in
d) cd "$OPTARG" ;; d) cd "$OPTARG" ;;
p) read_profiled="1" ;; p) read_profile="1" ;;
h) usage ;; h) usage ;;
\?) error "invalid option: -$OPTARG" ;; \?) error "invalid option: -$OPTARG" ;;
:) error "option -$OPTARG requires an argument" ;; :) error "option -$OPTARG requires an argument" ;;
@@ -32,13 +32,10 @@ shift $((OPTIND-1))
[ -z "$1" ] && usage [ -z "$1" ] && usage
if [ "$read_profiled" == "1" ]; then if [ "$read_profile" == "1" ]; then
shopt -s nullglob if [ -f .profile ]; then
for script in .profile.d/*; do source .profile
echo "sourcing $script" fi
source $script
done
shopt -u nullglob
fi fi
exec "$@" exec "$@"
+10 -7
View File
@@ -75,14 +75,17 @@ class Foreman::CLI < Thor
def run(*args) def run(*args)
load_environment! load_environment!
begin pid = fork do
process = Foreman::Process.new(args.shelljoin, :env => engine.env) begin
process.run engine.env.each { |k,v| ENV[k] = v }
rescue Errno::EACCES exec args.shelljoin
error "not executable: #{args.first}" rescue Errno::EACCES
rescue Errno::ENOENT error "not executable: #{args.first}"
error "command not found: #{args.first}" rescue Errno::ENOENT
error "command not found: #{args.first}"
end
end end
Process.wait(pid)
end end
desc "version", "Display Foreman gem version" desc "version", "Display Foreman gem version"
+1 -1
View File
@@ -1,5 +1,5 @@
module Foreman module Foreman
VERSION = "0.54.0" VERSION = "0.56.0"
end end