-
Notifications
You must be signed in to change notification settings - Fork 16
install-cli with --path give wrong export #441
Comments
As per the doc https://github.com/projectatomic/vagrant-service-manager/blob/master/commands.adoc#install-cli the command that need to run should be
@jeffmaury Could you check that and add result? |
With --path cli/oc, then the result is:
|
I tried on linux (FC24) to install oc, but neither relative path nor absolute path did work. Tried following 2 commands: I've tried to use it as path to a directory (/home/mlabuda/cdk/oc dirs exists| and also as a path to binary (without existence of oc directory in cdk dir). Client tools were not downloaded to any of those paths/dirs. Both commands gimme following output:
|
@mlabadu Actually in your case binary has been already downloaded and hence it is showing as Could you do |
I tried again with clearing dirs after each attempts. All 4 scenarios end up same way - it was always put into /home/mlabuda/.vagrant.d/data/service-manager/bin/openshift/1.2.1/oc Also notice, that downloaded version of oc binary is 1.2.1 even though I use CDK 21-Nov-2016.rc2. There should be binary 1.3.1 instead of 1.2.1. |
@jeffmaury @mlabuda I forgot to mention that this option Probably adding an information message like "Not supported for CDK" will be good approach here. Anyway thanks for coming up with this. |
@budhrg it's the version which we cannot change on CDK, right? The path option should work on ADB and CDK regardless. IMO this is a bug. |
I was wrong with my statement here. Another thing, I found that relative path doesn't work for I will add the fix for the relative path and things will work then. |
Right. CDK only offers only a single blessed version of oc. Using the --version option should abort with a warning, right?
So that's a bug then, right? We said it should work with absolute and relative path. At least that's what I remember. |
Ya |
That said, relative path might be tricky at times. I guess with relative the user would mean relative to the directory from which he executes 'vagrant service-manager install-cli'. This is not necessarily the base of file operations. I would think the base is somewhere relative to the directory from which the plugin is executed. I would not be surprised if oc is actually somewhere on the file system, just not were one expects. So we need to also define that "relative" means relative to the directory of the Vagrantfile. So doc and code changes required here. |
@hferentschik I think relative mostly means from the directly where vagrant install-cli command is fired. |
that's the expectation, but this is not necessarily the case when using the file api of say Ruby or Java. |
Got it. Like our cucumber feature implementation. |
@budhrg why is it that one has to add "oc" to the path? Doesnt seem like the most intuitive to me. |
not 'oc' itself, but the path in which oc is located. This way you can change into another directory, for example your project sources and execute any 'oc' command you like. |
Well, yes and now. But look at https://github.com/projectatomic/vagrant-service-manager/blob/master/lib/vagrant-service-manager/binary_handlers/binary_handler.rb#L85 This code works just for the case where the path is absolute and the directory structure exists. If there are intermediate directories missing it will fail (no mkdir_p). Whether one should do this intermediate create or not is another question. If not, there should be a clear warning/error about the nature of the problem. When it comes to relative path, there is nothing in here which will assure that it will be relative to the Vagrantfile. My guess is that per default it is relative to the directory from which Ruby gets started. Really one needs to check whether one is dealing with a relative path and if so determine the path to the Vagrantfile and create take it from there. Whether you want to support intermediate directories is again an orthogonal issue, but if not, the user needs to get clear and consistent messages. |
ahh, now I get it. You seem to need to specify the actual binary as well. Yes, that's wrong. You should just have to specify the directory/path. |
You can bu then the PATH is wrongly set |
This is an error saying "Invalid path" |
Tracked here now #446 |
Closing it as it has been address by #446 |
OS details:
Win10 Pro
Provider:
VirtualBox
Output of
vagrant -v
:Output of
vagrant plugin list
:Output of
vagrant service-manager box version
:Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
The text was updated successfully, but these errors were encountered: