From 9774ddc17b167121db92f8eb25fd528b32f4734e Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 14 Apr 2020 16:54:23 +0800 Subject: [PATCH] Update announcement.gemspec --- announcement.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/announcement.gemspec b/announcement.gemspec index a358c63..c65abf0 100644 --- a/announcement.gemspec +++ b/announcement.gemspec @@ -11,8 +11,8 @@ puts 'editing files for sassc' new_gemfile_text = File.read(app_path+'/temp_file/Gemfile') old_gemfile_text = File.read(env_pwd+'/Gemfile') check_texts = ['@import "../../bootstrap/variables";',".response-content {\n justify-self: auto;\n}\n"] -git_url = Bundler.with_clean_env{%x[cd '#{env_pwd}' && git config --get remote.origin.url].sub("\n",'')} -git_remote = Bundler.with_clean_env{%x[cd '#{env_pwd}' && git remote].sub("\n",'')} +git_url = Bundler.with_clean_env{%x[cd '#{env_pwd}' && git config --get remote.origin.url].split("\n")[0]} +git_remote = Bundler.with_clean_env{%x[cd '#{env_pwd}' && git remote].split("\n")[0]} if git_url != 'http://ruling.digital/git' puts 'changing remote url' Bundler.with_clean_env{system("cd #{env_pwd} && git remote set-url #{git_remote} http://ruling.digital/git")}