Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

mv: illegal option -- T #173

Open
pbgms opened this issue Jan 24, 2018 · 7 comments
Open

mv: illegal option -- T #173

pbgms opened this issue Jan 24, 2018 · 7 comments

Comments

@pbgms
Copy link

pbgms commented Jan 24, 2018

An error is produced on FreeBSD. It seems that FreeBSD does not have -T option for mv command. This option was introduced with shipit-deploy 2.5.0

'deploy:publish' errored after 553 ms
Error: Command failed: ssh user@server "cd /usr/home/…/nodejs && if [[ -d current && ! (-L current) ]]; then echo \"ERR: could not make symlink\"; else ln -nfs releases/20171204175536 current_tmp && mv -fT current_tmp current; fi"
mv: illegal option -- T
usage: mv [-f | -i | -n] [-hv] source target
       mv [-f | -i | -n] [-v] source ... directory
@nitin-jotwani
Copy link

Any solution? I'm also receiving this.

@pbgms
Copy link
Author

pbgms commented Feb 14, 2018

@nitin-jotwani No, I don't use shipit for that project. But maybe downgrading to pre 2.5.0 version could solve this.

@gregberge
Copy link
Member

No solution at this moment, sorry. I would have time to release v4, but I have a lot of work these days...

@gregberge
Copy link
Member

I close it, feel free to reopen it after v4.

@joja-agency
Copy link

"An error is produced on FreeBSD. It seems that FreeBSD does not have -T option for mv command. This option was introduced with shipit-deploy 2.5.0".

Same on version 4.

@gvlekke
Copy link

gvlekke commented May 3, 2019

also with deploying to a mac I have the same issue

@Firer
Copy link

Firer commented Dec 28, 2020

I also ran into the same issue deploying to FreeBSD. I have a workaround monkey patch in my shipitfile.js which seems to be working. The equivalent to -T on FreeBSD for this specific use case is -h.

  shipit.blTask('fix-freebsd-mv', () => {
    shipit.pool.connections.forEach(connection => {
      const { run } = connection;

      connection.run = (cmd, options) => {
        cmd = cmd.replaceAll('mv -fT', 'mv -fh');
        return run.call(connection, cmd, options);
      }
    });
  });

  shipit.on('deploy', () => {
    return shipit.start(['fix-freebsd-mv']);
  });

@Firer Firer mentioned this issue Mar 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

6 participants