fixed a setup.sh error that would occur on macos

This commit is contained in:
Jonathan Dunn 2024-03-12 12:37:16 -04:00
parent 6712759c50
commit 654410530c
2 changed files with 2 additions and 10 deletions

View File

@ -388,14 +388,6 @@ class Alias:
for pattern in allPatterns:
self.remove(pattern)
def find_line(self, name):
for file in self.config_files:
with open(file, "r") as f:
lines = f.readlines()
for line in lines:
if line.strip("\n") == f"alias ${name}='{alias}'":
return line
def add_patterns(self):
allPatterns = os.listdir(self.patterns)
for pattern in allPatterns:

View File

@ -40,8 +40,8 @@ for config_file in "${config_files[@]}"; do
echo -e "\n# Load custom aliases\n$source_line" >> "$config_file"
echo "Added source command for $bootstrap_file in $config_file."
fi
sed -i '/alias fabric=/d' "$config_file"
sed -i '/fabric --pattern/d' "$config_file"
sed -i '' '/alias fabric=/d' "$config_file"
sed -i '' '/fabric --pattern/d' "$config_file"
else