Skip to content

Commit

Permalink
improve extraction errors detection, fix rights for travis, update #1680
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed Mar 31, 2013
1 parent 8563da9 commit bb14285
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ install:
- gem install bundler --pre
- gem install tf -v '>=0.4.1'
before_script:
- sudo chown -R $USER: $rvm_path
- gem install bundler --pre
- rvm alias delete default
- hash -r
Expand Down
13 changes: 8 additions & 5 deletions scripts/functions/utility
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ __rvm_package_extract_run()
__rvm_package_extract()
{
rvm_debug __rvm_package_extract:$#: "$@"
typeset __tempdir __path __return
typeset __tempdir __path __file __return
__return=0
__tempdir="$( TMPDIR="${rvm_tmp_path}" mktemp -d )"
__rvm_package_extract_run "$1" "$__tempdir" || __return=$?
Expand All @@ -821,14 +821,17 @@ __rvm_package_extract()
then
for __path in "$__tempdir"/*
do
if [[ -f "$2/${__path##*/}" ]]
then rm -rf "$2/${__path##*/}"
__file="${__path##*/}"
if
[[ -n "${__file}" && -e "$2/${__file}" ]]
then
\rm -rf "$2/${__file}" || __return=$?
fi
mv "${__path}" "$2" || __return=$?
\mv -f "${__path}" "$2/" || __return=$?
done
fi
if [[ -n "$__tempdir" ]]
then rm -rf "$__tempdir"
then \rm -rf "$__tempdir"
fi
return $__return
}
Expand Down

0 comments on commit bb14285

Please sign in to comment.