pkgxdev / pkgx

the last thing you’ll install

Home Page:https://pkgx.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Symlink of pkgx.yaml is not picked up

fredrikaverpil opened this issue · comments

Expected behavior

  • Add symlink to a pkgx.yaml file in a project directory.
  • Run dev in project directory so to activate developer environment tooling.
  • Cd into project directory.
  • 🟢 The pkgx.yaml is read and the specified tooling is installed/loaded.

Actual behavior

  • Add symlink to a pkgx.yaml file in a project directory.
  • Run dev in project directory so to activate developer environment tooling.
  • Cd into project directory.
  • 🔴 No tooling is loaded. I don't think the file is recognized.

More details

$ ls -lha

drwxr-xr-x  45 fredrik  staff   1.4K Dec 13 21:22 .
drwxr-xr-x  21 fredrik  staff   672B Dec 12 18:01 ..
lrwxr-xr-x@  1 fredrik  staff    48B Dec 13 21:22 pkgx.yaml -> /Users/fredrik/code/dotfiles/templates/pkgx.yaml
$ cat pkgx.yaml

dependencies:
  - ruby
  - gem
  - node
  - npm
  - python

can confirm.

  for await (const [path, {name, isFile, isDirectory}] of dir.ls()) {
    if (isFile) {
      switch (name) {
...
      case "pkgx.yml":
      case "pkgx.yaml":
      case ".pkgx.yml":
      case ".pkgx.yaml":
        await parse_well_formatted_node(await path.readYAML())
        break
      }
  export interface DirEntry {
...
    /** True if this is info for a regular file. Mutually exclusive to
     * `DirEntry.isDirectory` and `DirEntry.isSymlink`. */
    isFile: boolean;

so, the really needs to be !isDirectory or isFile || (isSymlink && check_that_the_symlink_is_to_a_file()).

Has this been implemented yet? I can make a PR if not

@michaelessiet I can't say for sure, but I haven't tried to implement this.