Skip to content

Commit

Permalink
Merge pull request #16 from neilcampbell/master
Browse files Browse the repository at this point in the history
Fixing a path issue as %~dp0 resolves the path the bat is running from
  • Loading branch information
bethesque committed Mar 22, 2015
2 parents 2199b0b + 9b3127c commit 4bfc189
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions packaging/wrapper.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
@echo off

SET RUNNING_PATH=%~dp0
CALL :RESOLVE "%RUNNING_PATH%\.." ROOT_PATH

:: Tell Bundler where the Gemfile and gems are.
set "BUNDLE_GEMFILE=%~dp0\lib\vendor\Gemfile"
set "BUNDLE_GEMFILE=%ROOT_PATH%\lib\vendor\Gemfile"
set BUNDLE_IGNORE_CONFIG=

:: Run the actual app using the bundled Ruby interpreter, with Bundler activated.
@"%~dp0\lib\ruby\bin\ruby.bat" -rbundler/setup -I%~dp0\lib\app\lib "%~dp0\lib\app\pact-mock-service.rb" %*
@"%ROOT_PATH%\lib\ruby\bin\ruby.bat" -rbundler/setup -I%ROOT_PATH%\lib\app\lib "%ROOT_PATH%\lib\app\pact-mock-service.rb" %*

GOTO :EOF

:RESOLVE
SET %2=%~f1
GOTO :EOF

0 comments on commit 4bfc189

Please sign in to comment.