tmuxinator generated bash script ruined by ruby error message that should be on stderr?

114 views Asked by At

So I'm trying to bring me up a tmuxinator (version 1.1) window and panes...and when I do nothing happens...so I run this instead:

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
...

and I notice that some ruby library deep, deep down is complaining about a directory being writable at the top of the script that is generated and that's why it won't run...I copied just the bash script into another terminal and it runs just fine.

I went to the file in question:

   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

So I figure maybe it doesn't like the permissions on my ~/.tmux.conf, they are a little goofy (thanks MS, every file in my OneDrive is -rw-rw-rw- using this WSL thing).

I try changing it:

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

Now it's permissions are -rw-r--r--

I run tmuxinator debug pwrsh_n_bash again, and I still get the same error message at the top that prevents it from running...

Maybe it's the ~/.tmuxinator folder I think...

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

re-ran $ tmuxinator debug pwrsh_n_bash, still get the error at the top.

I'm aware that I have some of these writable folders on my mounted c drive but I don't understand what that has to do with this warning showing up and preventing me from terminal bliss.

What library causes this issue and how can I shut up it's warning? And shouldn't that stuff be piped out to stderr instead of it showing up in my stdout or the file that this gem is trying to execute after writing it?

0

There are 0 answers