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

Bug: can't copy file from custom location #267

Open
airtonix opened this issue Nov 16, 2022 · 2 comments
Open

Bug: can't copy file from custom location #267

airtonix opened this issue Nov 16, 2022 · 2 comments

Comments

@airtonix
Copy link
Contributor

Description

if my dotfiles repo looks like

./
  manifests/
    linux/
      starship.yml
      asdf.yml
      zsh.yml
    windows/
      starship.yml
    macosx/
      starship.yml
      asdf.yml
  profiles/
    asdf/
      setup.bash
    xresources/
      Xresources.tpl
      Xresources.theme
      Xresources.xterm
      Xresources.xvrt
    zsh/
      zshrc
      zshenv
      zprofile
      parts/
      lib/
    ps/
      profile.ps1
      parts/
      lib/

and my manifests/linux/zsh.yml wants to copy a file from the profiles/zsh directory... it can't because:

---
where: os.name == "linux"

actions:
 - action: file.link
   source: profile/zsh/.zshrc
   target: ~/.zshrc

means: symlink manifests/linux/files/profile/zsh/.zshrc to ~/.zshrc

and

---
where: os.name == "linux"

actions:
 - action: file.link
   source: ../../profile/zsh/.zshrc
   target: ~/.zshrc

results in an error

 INFO execute:{manifest="manifest.git"}:{action=file.copy}: Action failed to get plan: Failed to get contents for FileCopy action: Failed because ~/Projects/Dotfiles/manifest/files/../../../profile/gitconfig was not found

I guess im'm only allowe to have a folder structure of :


./
  manifests/
    starship.yml
    asdf.yml
    zsh.yml
    files/
      tools/
        asdf/
          setup.bash
      profiles/
        xresources/
          Xresources.tpl
          Xresources.theme
          Xresources.xterm
          Xresources.xvrt
        zsh/
          zshrc
          zshenv
          zprofile
          parts/
          lib/
        ps/
          profile.ps1
          parts/
          lib/

Additional information
Add more context which didn't fit in the fields above.

@airtonix airtonix changed the title Feature: can't copy file from custom location Bug: can't copy file from custom location Nov 23, 2022
@icepuma
Copy link
Member

icepuma commented Nov 30, 2022

I'm torn between declaring it a bug or missing functionality, as it is clearly a convention to be in files relative to the root dir of the manifest.

@rawkode
Copy link
Member

rawkode commented Dec 10, 2022

This is a limitation at the moment because we need to improve Comtrya manifest detection from random YAML in the repo. It’s a huge pain point for me too.

Let me come up with a solution this week and I’ll share on the community call Thursday for quick feedback

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

3 participants