Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
possum16365y@devphobe At that time it was like 20MB and the machine was a test VM, which was enough to make the whole script fail. Now that it is smaller, all works fine (tested it again right now). This thing is mocking me.
-
@possum background tasks suck. I've written way too many "expect" bash scripts that wait until other tasks finish.
-
-
possum16365y@IntrusionCM There's no link to this script, as it is on a private server.
Code was as follows:
git clone <url to private repo with access token>
if [ -f '/file/is/there' ]; then
mv /download/repoName /new/location
fi
I tried with and without checking existence, both failed.
Now that the repo is smaller it works just fine now (as I've said, this thing is mocking me). -
Can you use the --progress flag and monitor the progress of the clone by looking at standard error? Then look for something that indicates the clone is finished?
-
@fzammetti
>implying the ultimate Ctrl+Z is a mistake
>implying java is not the industry's worst mistake -
@possum I think the error lies somewhere else....
Yes git does start eg git-remote... as a child process, but the parent process shouldn't exit before the child processes exited.
As such, git clone should work...
Where are the files stored? A local drive or a network share?
I think the error is somewhere else... -
possum16365y@IntrusionCM Infrastructure:
Github Enterprise, self hosted instance by the university
Ubuntu Server, virtualised machine, hosted by the university
Tested on: VM, matching prod as close as possible, running on my own machine at home
The download took quite some time as a team mate had pushed his node_modules, and inside my own test VM it took even longer. All tests led me to believe, that the script did not wait for the clone to finish and moved on.
The problem is "solved" now, as the download completes much faster and &&-ing the next instruction perfectly works, which it did absolutely not back then. -
@AndroidJester Indeed. Doesn't make it right or good, but can't argue with facts: Git is the de-facto standard in SCM at this point, so people like me can hate it all we want, but we gotta deal with it either way.
Related Rants
Fun Fact: Did you know that git clone starts a child process for downloading the repo but the parent process terminates, therefore working in an asynchrone way so &&-ing the next instruction, which might rely on those files, won't help you?
Well now you know, and so do I.
Fornicating piece of excrement, what a fun afternoon.
rant
shell script
bash
git clone