Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returns to home directory on every task execution #140

Closed
m-triassi opened this issue May 27, 2019 · 1 comment
Closed

Returns to home directory on every task execution #140

m-triassi opened this issue May 27, 2019 · 1 comment

Comments

@m-triassi
Copy link

  • Envoy Version: 1.5.0
  • Laravel Version: 5.8.18
  • PHP Version: 7.2.8
  • Database Driver & Version: Mysql 5.7.23

Description:

When executing a story directive on some remote server (CentOS 7) , each task in the story first returns to the home directory before executing the contents of the task, eg:

@story('staging', ['on' => 'staging'])
    cdSiteStaging
    git
    migrate
    composer
    npmInstallAndDev
    compileComponents
@endstory

@task('cdSiteStaging')
    cd /var/www/website/docroot
@endtask

@task('git')
    @if($branch)
        git pull origin {{ $branch }}
    @else
        git pull origin master
    @endif
@endtask

Steps To Reproduce:

Happens on a CentOS 7 server when executing the above story, eg: envoy run staging

@driesvints
Copy link
Member

This is the default behavior. All of your tasks will start from the default login location for your user. Your story block is just to define a group of tasks. This is because different tasks could be run in different locations. You'll have to cd to the correct location on each task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants