Skip to content

Commit

Permalink
ci: Fix check path is not correct
Browse files Browse the repository at this point in the history
Signed-off-by: Huaqi Fang <578567190@qq.com>
  • Loading branch information
fanghuaqi committed Dec 29, 2023
1 parent 2415bfb commit 6c5391f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/prepare_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,15 @@ def setup_nuclei_studio(toolsdir, nuclei_url, system_value, reuse):

# Fix nuclei studio path
for item in os.listdir(nuclei_folder):
if os.path.isdir(item) and item.startswith("NucleiStudio") and item != "NucleiStudio":
itemdir = os.path.join(nuclei_folder, item)
if os.path.isdir(itemdir) and item.startswith("NucleiStudio") and item != "NucleiStudio":
nsidepath = os.path.join(nuclei_folder, item)
newpath = os.path.join(nuclei_folder, "NucleiStudio")
if len(os.listdir(nsidepath)) == 1:
nsidepath = os.path.join(nsidepath, "NucleiStudio")
# rename old ide path to new ide path
# such as NucleiStudio_IDE_202310/NucleiStudio -> NucleiStudio
print("Move %s -> %s" % (nsidepath, newpath))
os.rename(nsidepath, newpath)
break

Expand Down

0 comments on commit 6c5391f

Please sign in to comment.