austincunningham / change_oc Goto Github PK
View Code? Open in Web Editor NEWA command line tool for downloading and switching between oc binarys
Home Page: http://change-oc.ddns.net
License: Apache License 2.0
A command line tool for downloading and switching between oc binarys
Home Page: http://change-oc.ddns.net
License: Apache License 2.0
Request finished writing to file
================================= Extract OC =======================================
download version: 3.9
Extract completed
File extracted
[Function: change]
================================= Change OC ========================================
What version of oc do you wish to switch to ?
oc version changed to :3.9
Looks like there is no 4.7 in the path
https://github.com/austincunningham/change_oc/blob/master/src/download.js#L54
https://mirror.openshift.com/pub/openshift-v4/clients/oc/
may need to revert #66
touch: cannot touch '/usr/bin/oc': No such file or directory
child_process.js:651
throw err;
^
Error: Command failed: sudo touch /usr/bin/oc
touch: cannot touch '/usr/bin/oc': No such file or directory
at checkExecSyncError (child_process.js:611:11)
at execSync (child_process.js:648:13)
at Object.<anonymous> (/home/austin/repo/change_oc/index.js:20:3)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:279:19)
npm start
[email protected] start /home/austin/repo/change_oc
node index.js
======================== Check for OC Version Installed =============================
The folowing versions of oc are installed at /opt/openshift
Getting the following error when trying to run change_oc
:
======================== Check for OC Version Installed =============================
The folowing versions of oc are installed at /opt/openshift
find: ‘/usr/bin/oc’: No such file or directory
child_process.js:669
throw err;
^
Error: Command failed: sudo find /usr/bin/oc -type l -delete
find: ‘/usr/bin/oc’: No such file or directory
at checkExecSyncError (child_process.js:629:11)
at execSync (child_process.js:666:13)
at Object.<anonymous> (/usr/lib/node_modules/change_oc/index.js:15:3)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
at startup (internal/bootstrap/node.js:283:19)
➜ ~ change_oc
======================== Check for OC Version Installed =============================
The folowing versions of oc are installed at /opt/openshift
Installed
oc
================================= Download OC =======================================
Do you wish to install an oc binary yes/no ? yes
What version of oc do you wish to install ?
- 3.7
- 3.9
- 3.10
- 3.11
- 4.1
4.1
==========
Request finished writing to file
================================= Extract OC =======================================
download version: 4.1
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
child_process.js:669
throw err;
^
Error: Command failed: tar --warning=no-unknown-keyword -C 4.1 -zxvf 4.1.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
at checkExecSyncError (child_process.js:629:11)
at execSync (child_process.js:666:13)
at fs.exists (/usr/lib/node_modules/change_oc/src/extract.js:23:7)
at suppressedCallback (fs.js:199:5)
at FSReqWrap.args [as oncomplete] (fs.js:140:20)
3.10 tars are corrupted and can't be used to install
may be nvm related
/.nvm/versions/node/v10.11.0/lib/node_modules/change_oc: Appears to be a git repo or submodule.
npm ERR! git /home/austin/.nvm/versions/node/v10.11.0/lib/node_modules/change_oc
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.
npm start
> [email protected] start /home/austincunningham/repo/change_oc
> node index.js
======================== Check for OC Version Installed =============================
The folowing versions of oc are installed at /opt/openshift
4.1
4.2
Installed
ocm
================================= Download OC =======================================
Do you wish to install an oc binary yes/no ? y
What version of oc do you wish to install ?
- 3.7
- 3.9
- 3.10
- 3.11
- 4.1
- 4.2
- 4.3
- 4.4
- 4.5
- 4.6
4.6
====>
internal/streams/legacy.js:57
throw er; // Unhandled stream error in pipe.
^
Error: ESOCKETTIMEDOUT
at ClientRequest.<anonymous> (/home/austincunningham/repo/change_oc/node_modules/request/request.js:816:19)
at Object.onceWrapper (events.js:286:20)
at ClientRequest.emit (events.js:198:13)
at TLSSocket.emitRequestTimeout (_http_client.js:673:40)
at Object.onceWrapper (events.js:286:20)
at TLSSocket.emit (events.js:198:13)
at TLSSocket.Socket._onTimeout (net.js:443:8)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/austincunningham/.npm/_logs/2021-05-26T10_45_51_578Z-debug.log
I got an error trying to install oc 4.3. Note that 4.1 worked fine.
download version: 4.3
tar (child): 4.3.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
child_process.js:669
throw err;
^
Error: Command failed: tar --warning=no-unknown-keyword -C 4.3 -zxvf 4.3.tar.gz
tar (child): 4.3.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
at checkExecSyncError (child_process.js:630:11)
at execSync (child_process.js:666:15)
at /home/ephelan/.npm/_npx/250271/lib/node_modules/change_oc/src/extract.js:23:7
at suppressedCallback (fs.js:215:5)
at FSReqCallback.oncomplete (fs.js:156:23) {
status: 2,
signal: null,
output: [
null,
Buffer(0) [Uint8Array] [],
Buffer(187) [Uint8Array] [
116, 97, 114, 32, 40, 99, 104, 105, 108, 100, 41, 58,
32, 52, 46, 51, 46, 116, 97, 114, 46, 103, 122, 58,
32, 67, 97, 110, 110, 111, 116, 32, 111, 112, 101, 110,
58, 32, 78, 111, 32, 115, 117, 99, 104, 32, 102, 105,
108, 101, 32, 111, 114, 32, 100, 105, 114, 101, 99, 116,
111, 114, 121, 10, 116, 97, 114, 32, 40, 99, 104, 105,
108, 100, 41, 58, 32, 69, 114, 114, 111, 114, 32, 105,
115, 32, 110, 111, 116, 32, 114, 101, 99, 111, 118, 101,
114, 97, 98, 108,
... 87 more items
]
],
pid: 250356,
stdout: Buffer(0) [Uint8Array] [],
stderr: Buffer(187) [Uint8Array] [
116, 97, 114, 32, 40, 99, 104, 105, 108, 100, 41, 58,
32, 52, 46, 51, 46, 116, 97, 114, 46, 103, 122, 58,
32, 67, 97, 110, 110, 111, 116, 32, 111, 112, 101, 110,
58, 32, 78, 111, 32, 115, 117, 99, 104, 32, 102, 105,
108, 101, 32, 111, 114, 32, 100, 105, 114, 101, 99, 116,
111, 114, 121, 10, 116, 97, 114, 32, 40, 99, 104, 105,
108, 100, 41, 58, 32, 69, 114, 114, 111, 114, 32, 105,
115, 32, 110, 111, 116, 32, 114, 101, 99, 111, 118, 101,
114, 97, 98, 108,
... 87 more items
]
}
looks like if /usr/bin/oc doesn't exist the change fails and no error is caught .
Solution is to add sudo touch /usr/bin/oc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.