chengshiwen commented on code in PR #11018:
URL: https://github.com/apache/dolphinscheduler/pull/11018#discussion_r923335128
##########
script/install.sh:
##########
@@ -22,14 +22,21 @@ workDir=`cd ${workDir};pwd`
source ${workDir}/env/install_env.sh
source ${workDir}/env/dolphinscheduler_env.sh
+
echo "1.create directory"
# If install Path equal to "/" or related path is "/" or is empty, will cause
directory "/bin" be overwrite or file adding,
# so we should check its value. Here use command `realpath` to get the related
path, and it will skip if your shell env
# without command `realpath`.
if [ ! -d $installPath ];then
- sudo mkdir -p $installPath
- sudo chown -R $deployUser:$deployUser $installPath
+ echo "sudo enabled = ${sudoEnable}"
+ if [ ${sudoEnable} = true ]; then
+ sudo mkdir -p $installPath
+ sudo chown -R $deployUser:$deployUser $installPath
+ else
+ mkdir -p $installPath
+ chown -R $deployUser:$deployUser $installPath
Review Comment:
code styles +1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]