-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
findBower() returns NULL #53
Comments
Interesting I will try to debug. What do you get when you
? |
Thanks @yutannihilation for the bug report. @timelyportfolio I think a NULL check would be good to add in any case. Maybe, we need a function like this is_bower_installed <- function(){
} |
@timelyportfolio @ramnathv > Sys.which("bower")
bower
"" This code checks two conditions; (1) if if(Sys.which("bower") == "") {
if(identical(.Platform$OS.type,"windows")) {
Sys.which(file.path(Sys.getenv("APPDATA"),"npm","bower."))
}
} else {
Sys.which("bower")
} To fix this, you can easily add one more if(Sys.which("bower") == "") {
if(identical(.Platform$OS.type,"windows")) {
Sys.which(file.path(Sys.getenv("APPDATA"),"npm","bower."))
} else {
Sys.which("bower")
}
} else {
Sys.which("bower")
} Generally speaking, nested if-statement should be avoided if possible. I prefer simpler one like this: bowerPath = Sys.which("bower")
if(bowerPath == "" && identical(.Platform$OS.type,"windows")) {
bowerPath = Sys.which(file.path(Sys.getenv("APPDATA"),"npm","bower."))
}
return(bowerPath) But, I totally agree with @ramnathv's idea of |
Understand completely. Was confused because I fixed once in an earlier version but somehow I did not apply the fix to my pulled branch. Will try again and make sure I do properly this time. Thanks so much. |
Oh, thank you for using my code. It's my honor :) |
Thanks for the detailed bug report and code. Now let's see some widgets :) |
@yutannihilation, can we close this? Thanks so much for all the widgets. |
@timelyportfolio, Yes! Now I close this issue. Thanks again for fixing this! |
I don't install Bower yet, so
scaffoldWidget()
should stop here:But
findBower()
returnsNULL
, accordingly this if-statement fails.I think
else
is needed here, instead of here (I'm using Ubuntu 14.04)The text was updated successfully, but these errors were encountered: