Last active
August 29, 2015 14:07
-
-
Save mk-pmb/51fea426d47c3861e1a6 to your computer and use it in GitHub Desktop.
Bower proxy config test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# -*- coding: utf-8, tab-width: 2 -*- | |
# Ubuntu style, as npm and wget use it: | |
export http_proxy='http://pub-inet.proxy.lan:3128' | |
export https_proxy="$http_proxy" | |
# Windows wget style: | |
export HTTP_PROXY="$http_proxy" | |
export HTTPS_PROXY="$http_proxy" | |
# application-specific: | |
echo '{ | |
"proxy": "'"$http_proxy"'", | |
"https-proxy": "'"$http_proxy"'" | |
}' >"$HOME"/.bowerrc | |
( echo -n 'Test proxy connectivity: ' | |
wget -qO - http://bower.io/ | grep -Fe '<title>' | |
bower install bower 2>&1 | |
lsb_release -sdc | fmt | |
) | sed -re 's~/mnt/\S+(modules/bower)~/…node_\1~g' | tee proxy-test.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test proxy connectivity: <title>Bower</title> | |
bower error Object #<Object> has no method 'doUntil' | |
Stack trace: | |
TypeError: Object #<Object> has no method 'doUntil' | |
at RegistryClient.lookup (/…node_modules/bower-registry-client/lib/lookup.js:23:11) | |
at Promise.apply (/…node_modules/bower/node_modules/q/q.js:1122:26) | |
at Promise.promise.promiseDispatch (/…node_modules/bower/node_modules/q/q.js:752:41) | |
at /…node_modules/bower/node_modules/q/q.js:1337:14 | |
at flush (/…node_modules/bower/node_modules/q/q.js:108:17) | |
at process._tickCallback (node.js:419:13) | |
Console trace: | |
Trace | |
at StandardRenderer.error (/…node_modules/bower/lib/renderers/StandardRenderer.js:74:17) | |
at Logger.updateNotifier.packageName (/…node_modules/bower/bin/bower:109:18) | |
at Logger.emit (events.js:95:17) | |
at Logger.emit (/…node_modules/bower-logger/lib/Logger.js:29:39) | |
at /…node_modules/bower/lib/commands/install.js:27:16 | |
at _rejected (/…node_modules/bower/node_modules/q/q.js:808:24) | |
at /…node_modules/bower/node_modules/q/q.js:834:30 | |
at Promise.when (/…node_modules/bower/node_modules/q/q.js:1079:31) | |
at Promise.promise.promiseDispatch (/…node_modules/bower/node_modules/q/q.js:752:41) | |
at /…node_modules/bower/node_modules/q/q.js:574:44 | |
System info: | |
Bower version: 1.2.8 | |
Node version: 0.10.32 | |
OS: Linux 3.2.0-48-generic ia32 | |
Ubuntu 12.04.5 LTS precise |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment