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

Workdir for remote is being used by local: true task #46

Open
4 of 11 tasks
rprtr258 opened this issue Nov 27, 2022 · 1 comment
Open
4 of 11 tasks

Workdir for remote is being used by local: true task #46

rprtr258 opened this issue Nov 27, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@rprtr258
Copy link

rprtr258 commented Nov 27, 2022

  • I have the latest version of sake
  • I have searched through the existing issues

Info

  • OS

    • Linux
    • Mac OS X
    • Windows
    • other
  • Shell

    • Bash
    • Zsh
    • Fish
    • Powershell
    • other

Installed with go install github.com/alajmo/sake@latest

  • Version:
Version: dev
Commit: none
Date: n/a

Problem / Steps to reproduce

sake.yml:

servers:
  localhost:
    host: 0.0.0.0
    local: true
  remote:
    host: 0.0.0.0
    local: true
    work_dir: does_not_exist

tasks:
  ping:
    desc: Pong
    target: {servers: [remote]}
    tasks:
      - cmd: echo "pong"
        local: true

What's wrong:

$ sake run ping

TASK*********

$ sake run --any-errors-fatal ping

TASK*********

error: chdir /tmp/t/does_not_exist: no such file or directory
  1. Task silently fails in case of sake run ping, though it did nothing. I expected sake to print any errors and logs happened during execution of task.
  2. work_dir is used for remote server and task is required to run locally (local: true). But sake tries to go into work_dir locally before executing task, which is wrong behavior.
@rprtr258 rprtr258 added the bug Something isn't working label Nov 27, 2022
@alajmo
Copy link
Owner

alajmo commented Dec 4, 2022

I've reworked how working directories work (https://github.com/alajmo/sake/releases), the full specification can be found here https://sakecli.com/work-dir. The above now prints the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants