[why]: source /root/.bashrc && /root/.bash_profile follow this step can not success.
Signed-off-by: Li Ping 1477412247@qq.com --- container/mail-robot/lib/assign-account-email.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/container/mail-robot/lib/assign-account-email.rb b/container/mail-robot/lib/assign-account-email.rb index 77ed4e8..466586d 100755 --- a/container/mail-robot/lib/assign-account-email.rb +++ b/container/mail-robot/lib/assign-account-email.rb @@ -37,7 +37,7 @@ def build_apply_account_email(my_info) git clone https://gitee.com/wu_fengguang/lkp-tests.git cd lkp-tests make install - source ${HOME}/.bashrc && source ${HOME}/.bash_profile + source \${HOME}/.\${SHELL##*/}rc
3) submit job reference: https://gitee.com/wu_fengguang/compass-ci/blob/master/doc/tutorial.md
On Sat, Dec 19, 2020 at 07:39:52PM +0800, Li Ping wrote:
[why]: source /root/.bashrc && /root/.bash_profile follow this step can not success.
source ${HOME}/.bashrc && source ${HOME}/.bash_profile
source \\${HOME}/.\\${SHELL##*/}rc
ruby string won't expand SHELL ${}?
pry(main)> puts "${HOME}" ${HOME}
Thanks, Fengguang
Shengde, there must be some shell script that expanded this message. Where's that script?
Thanks, Fengguang
On Mon, Dec 21, 2020 at 09:57:31AM +0800, Wu Fengguang wrote:
On Sat, Dec 19, 2020 at 07:39:52PM +0800, Li Ping wrote:
[why]: source /root/.bashrc && /root/.bash_profile follow this step can not success.
source ${HOME}/.bashrc && source ${HOME}/.bash_profile
source \\${HOME}/.\\${SHELL##*/}rc
ruby string won't expand SHELL ${}?
pry(main)> puts "${HOME}" ${HOME}
Thanks, Fengguang
On Mon, Dec 21, 2020 at 10:19:52AM +0800, Wu Fengguang wrote:
Shengde, there must be some shell script that expanded this message. Where's that script?
No shell script expanded this message. just apply-account called it. if directly use ${HOME} or ${HOME}, it will be displayed to empty. I think it may be a bug use \${} will avoid it.
Thanks, Luan Shengde
Thanks, Fengguang
On Mon, Dec 21, 2020 at 09:57:31AM +0800, Wu Fengguang wrote:
On Sat, Dec 19, 2020 at 07:39:52PM +0800, Li Ping wrote:
[why]: source /root/.bashrc && /root/.bash_profile follow this step can not success.
source ${HOME}/.bashrc && source ${HOME}/.bash_profile
source \\${HOME}/.\\${SHELL##*/}rc
ruby string won't expand SHELL ${}?
pry(main)> puts "${HOME}" ${HOME}
Thanks, Fengguang
There must be some shell script that expanded it. Ruby cannot expand this.
% pry [1] pry(main)> email_msg = <<~EMAIL_MESSAGE [1] pry(main)* ${HOME} [1] pry(main)* EMAIL_MESSAGE => "${HOME}\n"
On Mon, Dec 21, 2020 at 06:43:33PM +0800, Luan Shengde wrote:
On Mon, Dec 21, 2020 at 10:19:52AM +0800, Wu Fengguang wrote:
Shengde, there must be some shell script that expanded this message. Where's that script?
No shell script expanded this message. just apply-account called it. if directly use ${HOME} or ${HOME}, it will be displayed to empty. I think it may be a bug use \${} will avoid it.
Thanks, Luan Shengde
Thanks, Fengguang
On Mon, Dec 21, 2020 at 09:57:31AM +0800, Wu Fengguang wrote:
On Sat, Dec 19, 2020 at 07:39:52PM +0800, Li Ping wrote:
[why]: source /root/.bashrc && /root/.bash_profile follow this step can not success.
source ${HOME}/.bashrc && source ${HOME}/.bash_profile
source \\${HOME}/.\\${SHELL##*/}rc
ruby string won't expand SHELL ${}?
pry(main)> puts "${HOME}" ${HOME}
Thanks, Fengguang
Please help find that shell script out -- it's likely a bug with missing "".
On Tue, Dec 22, 2020 at 09:32:47AM +0800, Wu Fengguang wrote:
There must be some shell script that expanded it. Ruby cannot expand this.
% pry [1] pry(main)> email_msg = <<~EMAIL_MESSAGE [1] pry(main)* ${HOME} [1] pry(main)* EMAIL_MESSAGE => "${HOME}\n"
On Mon, Dec 21, 2020 at 06:43:33PM +0800, Luan Shengde wrote:
On Mon, Dec 21, 2020 at 10:19:52AM +0800, Wu Fengguang wrote:
Shengde, there must be some shell script that expanded this message. Where's that script?
No shell script expanded this message. just apply-account called it. if directly use ${HOME} or ${HOME}, it will be displayed to empty. I think it may be a bug use \${} will avoid it.
Thanks, Luan Shengde
Thanks, Fengguang
On Mon, Dec 21, 2020 at 09:57:31AM +0800, Wu Fengguang wrote:
On Sat, Dec 19, 2020 at 07:39:52PM +0800, Li Ping wrote:
[why]: source /root/.bashrc && /root/.bash_profile follow this step can not success.
source ${HOME}/.bashrc && source ${HOME}/.bash_profile
source \\${HOME}/.\\${SHELL##*/}rc
ruby string won't expand SHELL ${}?
pry(main)> puts "${HOME}" ${HOME}
Thanks, Fengguang
On Tue, Dec 22, 2020 at 09:33:56AM +0800, Wu Fengguang wrote:
Please help find that shell script out -- it's likely a bug with missing "".
OK, I will check it out.
Thanks, Luan Shengde
On Tue, Dec 22, 2020 at 09:32:47AM +0800, Wu Fengguang wrote:
There must be some shell script that expanded it. Ruby cannot expand this.
% pry [1] pry(main)> email_msg = <<~EMAIL_MESSAGE [1] pry(main)* ${HOME} [1] pry(main)* EMAIL_MESSAGE => "${HOME}\n"
On Mon, Dec 21, 2020 at 06:43:33PM +0800, Luan Shengde wrote:
On Mon, Dec 21, 2020 at 10:19:52AM +0800, Wu Fengguang wrote:
Shengde, there must be some shell script that expanded this message. Where's that script?
No shell script expanded this message. just apply-account called it. if directly use ${HOME} or ${HOME}, it will be displayed to empty. I think it may be a bug use \${} will avoid it.
Thanks, Luan Shengde
Thanks, Fengguang
On Mon, Dec 21, 2020 at 09:57:31AM +0800, Wu Fengguang wrote:
On Sat, Dec 19, 2020 at 07:39:52PM +0800, Li Ping wrote:
[why]: source /root/.bashrc && /root/.bash_profile follow this step can not success.
source ${HOME}/.bashrc && source ${HOME}/.bash_profile
source \\${HOME}/.\\${SHELL##*/}rc
ruby string won't expand SHELL ${}?
pry(main)> puts "${HOME}" ${HOME}
Thanks, Fengguang
On Tue, Dec 22, 2020 at 09:37:19AM +0800, Luan Shengde wrote:
On Tue, Dec 22, 2020 at 09:33:56AM +0800, Wu Fengguang wrote:
Please help find that shell script out -- it's likely a bug with missing "".
OK, I will check it out.
Pay attention to ruby's `` or %x[] They also run shell implicitly.
Thanks, Fengguang
On Tue, Dec 22, 2020 at 09:32:47AM +0800, Wu Fengguang wrote:
There must be some shell script that expanded it. Ruby cannot expand this.
% pry [1] pry(main)> email_msg = <<~EMAIL_MESSAGE [1] pry(main)* ${HOME} [1] pry(main)* EMAIL_MESSAGE => "${HOME}\n"
On Mon, Dec 21, 2020 at 06:43:33PM +0800, Luan Shengde wrote:
On Mon, Dec 21, 2020 at 10:19:52AM +0800, Wu Fengguang wrote:
Shengde, there must be some shell script that expanded this message. Where's that script?
No shell script expanded this message. just apply-account called it. if directly use ${HOME} or ${HOME}, it will be displayed to empty. I think it may be a bug use \${} will avoid it.
Thanks, Luan Shengde
Thanks, Fengguang
On Mon, Dec 21, 2020 at 09:57:31AM +0800, Wu Fengguang wrote:
On Sat, Dec 19, 2020 at 07:39:52PM +0800, Li Ping wrote: >[why]: >source /root/.bashrc && /root/.bash_profile >follow this step can not success.
>- source ${HOME}/.bashrc && source ${HOME}/.bash_profile >+ source \${HOME}/.\${SHELL##*/}rc
ruby string won't expand SHELL ${}?
pry(main)> puts "${HOME}" ${HOME}
Thanks, Fengguang
On Tue, Dec 22, 2020 at 09:59:55AM +0800, Wu Fengguang wrote:
On Tue, Dec 22, 2020 at 09:37:19AM +0800, Luan Shengde wrote:
On Tue, Dec 22, 2020 at 09:33:56AM +0800, Wu Fengguang wrote:
Please help find that shell script out -- it's likely a bug with missing "".
OK, I will check it out.
Pay attention to ruby's `` or %x[] They also run shell implicitly.
I found it, when it calling to send mail, it used %x(curl ...) when it puts the email message, it is as we write it. but when we received it, it changed.
I will try to fix it.
Thanks, Luan Shengde
======================== run script: luanshd@crystal ~/script% ./test1.rb To: lsd Subject: test mail
You can use the following info to submit jobs:
1) setup default config run the following command to add the below setup to default config file
mkdir -p ~/.config/compass-ci/defaults/ cd lkp-tests source ${HOME}/.bashrc && source ${HOME}/.bash_profile % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 311 0 0 100 311 0 795 --:--:-- --:--:-- --:--:-- 793 ======== received email: From: team@crystal.ci To: lsd Subject: test mail
You can use the following info to submit jobs:
1) setup default config run the following command to add the below setup to default config file
mkdir -p ~/.config/compass-ci/defaults/ cd lkp-tests source /home/luanshd/.bashrc && source /home/luanshd/.bash_profile ========================
Thanks, Fengguang
On Tue, Dec 22, 2020 at 09:32:47AM +0800, Wu Fengguang wrote:
There must be some shell script that expanded it. Ruby cannot expand this.
% pry [1] pry(main)> email_msg = <<~EMAIL_MESSAGE [1] pry(main)* ${HOME} [1] pry(main)* EMAIL_MESSAGE => "${HOME}\n"
On Mon, Dec 21, 2020 at 06:43:33PM +0800, Luan Shengde wrote:
On Mon, Dec 21, 2020 at 10:19:52AM +0800, Wu Fengguang wrote:
Shengde, there must be some shell script that expanded this message. Where's that script?
No shell script expanded this message. just apply-account called it. if directly use ${HOME} or ${HOME}, it will be displayed to empty. I think it may be a bug use \${} will avoid it.
Thanks, Luan Shengde
Thanks, Fengguang
On Mon, Dec 21, 2020 at 09:57:31AM +0800, Wu Fengguang wrote: >On Sat, Dec 19, 2020 at 07:39:52PM +0800, Li Ping wrote: >>[why]: >>source /root/.bashrc && /root/.bash_profile >>follow this step can not success. > >>- source ${HOME}/.bashrc && source ${HOME}/.bash_profile >>+ source \${HOME}/.\${SHELL##*/}rc > >ruby string won't expand SHELL ${}? > >pry(main)> puts "${HOME}" >${HOME} > >Thanks, >Fengguang >
Hi Shenwei,
Since you'll learn how to use erb in libvirt xml, would you convert the email in
container/mail-robot/lib/assign-account-email.rb
to ERB btw? Please do it after all the meetings (2020.12.28).
Thanks, Fengguang
On Tue, Dec 22, 2020 at 10:03:25AM +0800, Wu Fengguang wrote:
Hi Shenwei,
Since you'll learn how to use erb in libvirt xml, would you convert the email in
container/mail-robot/lib/assign-account-email.rb
to ERB btw? Please do it after all the meetings (2020.12.28).
got it,
Thanks, Shenwei
Thanks, Fengguang