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

Fix mv -T #232

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix mv -T #232

wants to merge 2 commits into from

Conversation

podvarkov
Copy link

Remove -T option

Remove -T option
@gregberge
Copy link
Member

Hello @podvarkov, thanks for your contribution, can you make tests pass?

@podvarkov
Copy link
Author

I tried :)

@gregberge
Copy link
Member

So it looks like the -T was useful ;)

@podvarkov
Copy link
Author

podvarkov commented Feb 27, 2019

Can you tell me how to run your project and tests locally?
I cant run it? cause of babel imports :(

@gregberge
Copy link
Member

Tests were broken, I fixed it. But I think removing -T is not a good thing, it is actually required.

@utkarsh-dixit
Copy link

Tests were broken, I fixed it. But I think removing -T is not a good thing, it is actually required.

There's no "=T" option in my mac for mv. Here's the usage syntax for mv in osx:

usage: mv [-f | -i | -n] [-v] source target
       mv [-f | -i | -n] [-v] source ... directory

@neoziro Why is this so? Is it because there can be already existing "current" directory which would cause the "current_tmp" to move inside the "current"? If this is the case we can just delete the directory if it exists. Now, simply move the "current_tmp" to "current" using mv current_temp current.

if [ -d "current" ]; then rm -Rf current; fi && mv current_tmp current

I don't think there's any problem with this approach. Any thoughts regarding this?

@gregberge
Copy link
Member

Yes I think you are right, it could probably exist and move it inside. We have to add a command to prevent it. Could you add it @podvarkov?

@IndrekV
Copy link

IndrekV commented Jun 18, 2020

I'm seeing the same issue with -T not being supported on the server side. I think the solution would be to replace mv -fT current_tmp current with rm current && mv -f current_tmp current. This way the link is properly renamed and the old link is removed.

@Firer
Copy link

Firer commented Mar 7, 2021

I ran into a similar issue deploying to FreeBSD and came up with a hack to work around it #173 (comment) however I'm not sure this will work for deploying to MacOS.

I think it maybe worth investigating some other solution for the longer term. Perhaps a move to using ln to update the symlinks rather than using mv, since it seems that mv functionality varies across platforms. Something like ln -nfs newlocation existinglink https://superuser.com/a/938865

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants