Github user shivaram commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15790#discussion_r87509314
  
    --- Diff: R/check-cran.sh ---
    @@ -36,11 +36,27 @@ if [ ! -z "$R_HOME" ]
     fi
     echo "USING R_HOME = $R_HOME"
     
    -# Build the latest docs
    -$FWDIR/create-docs.sh
    +# Build the latest docs, but not vignettes, which is built with the 
package next
    +NO_VIGNETTES=1 $FWDIR/create-docs.sh
     
    -# Build a zip file containing the source package
    -"$R_SCRIPT_PATH/"R CMD build $FWDIR/pkg
    +# Build source package with vignettes
    +SPARK_HOME="$(cd "`dirname "$0"`"/..; pwd)"
    --- End diff --
    
    Yeah I think the problem might be related to how you invoke it. If you 
invoke the script with an absolute path say 
`/Users/shivaram/spark-1/R/check-cran.sh` then the existing code works fine. If 
I however use a relative path -- for example `./R/check-cran.sh` while I am in 
`/Users/shivaram/spark-1` then it doesn't work. 
    
    I think moving it to the top of the file is probably a good idea because 
the `$0` is relative to where the script started from and when we do `pushd 
$FWDIR` the working directory changes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to