0

所以我试图给我带来一个 tmuxinator(1.1 版)窗口和窗格......当我什么都不做时......所以我运行它:

leeand00@me-host:~$ tmuxinator debug pwrsh_n_bash
/var/lib/gems/2.4.0/gems/tmuxinator-1.1.1/lib/tmuxinator/project.rb:352: warning: Insecure world writable dir /mnt/c in PATH, mode 040777
#!/bin/bash

# Clear rbenv variables before starting tmux
unset RBENV_VERSION
unset RBENV_DIR
...

我注意到一些深层次的 ruby​​ 库抱怨在生成的脚本顶部有一个可写的目录,这就是它无法运行的原因......我只将 bash 脚本复制到另一个终端并运行正好。

我去了有问题的文件:

   def extract_tmux_config
      options_hash = {}

      options_string = `#{show_tmux_options}` # <- THIS BEING LINE 352 from whence the warning came...
      options_string.encode!("UTF-8", invalid: :replace)
      options_string.split("\n").map do |entry|
        key, value = entry.split("\s")
        options_hash[key] = value
        options_hash
      end

      options_hash
    end

所以我想也许它不喜欢我的权限~/.tmux.conf,它们有点傻(感谢 MS,我的 OneDrive 中的每个文件都在-rw-rw-rw-使用这个 WSL 东西)。

我尝试改变它:

$ chmod o-w ~/.tmux.conf
$ chmod g-w ~/.tmux

现在它的权限是-rw-r--r--

tmuxinator debug pwrsh_n_bash再次运行,我仍然在顶部收到相同的错误消息,阻止它运行......

也许是我认为的 ~/.tmuxinator 文件夹......

chmod -R o-w ./.tmuxinator/ chmod -R g-w ./.tmuxinator/

重新运行$ tmuxinator debug pwrsh_n_bash,仍然在顶部得到错误。

我知道我在安装的 c 驱动器上有一些这些可写文件夹,但我不明白这与出现此警告并阻止我获得终极幸福有什么关系。

什么库导致了这个问题,我该如何关闭它的警告?并且不应该将这些东西通过管道输出stderr而不是显示在我stdout的文件中或该 gem 在编写后尝试执行的文件中吗?

4

0 回答 0