Skip to content

Commit c453ab5

Browse files
authored
Fix the bug of direct/transitive npm packages (#177)
Signed-off-by: Jiyeong Seok <[email protected]>
1 parent a13b2e4 commit c453ab5

File tree

1 file changed

+0
-6
lines changed
  • src/fosslight_dependency/package_manager

1 file changed

+0
-6
lines changed

src/fosslight_dependency/package_manager/Npm.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ def start_license_checker(self):
6464
else:
6565
self.append_input_package_list_file(self.input_file_name)
6666

67-
if self.flag_tmp_node_modules:
68-
shutil.rmtree(node_modules, ignore_errors=True)
6967
os.remove(tmp_custom_json)
7068

7169
return ret
@@ -123,11 +121,7 @@ def parse_transitive_relationship(self):
123121
def parse_direct_dependencies(self):
124122
try:
125123
if os.path.isfile(const.SUPPORT_PACKAE.get(self.package_manager_name)):
126-
if not self.flag_tmp_node_modules:
127-
shutil.move(node_modules, f'tmp_fl_{node_modules}')
128124
self.parse_transitive_relationship()
129-
if not self.flag_tmp_node_modules:
130-
shutil.move(f'tmp_fl_{node_modules}', node_modules)
131125
else:
132126
logger.info('Direct/transitive support is not possible because the package.json file does not exist.')
133127
self.direct_dep = False

0 commit comments

Comments
 (0)