Sophie

Sophie

distrib > Mageia > 8 > i586 > media > core-release > by-pkgid > b3ad6b2bf8058eea36fda475cf997b30 > scriptlet

npm-6.14.8-1.14.15.1.3.mga8.i586.rpm

PRETRANS

<lua>
-- Remove all of the symlinks from the bundled npm node_modules directory
-- This scriptlet can be removed in Mageia 31
base_path = "/usr/lib/node_modules/npm/node_modules/"
d_st = posix.stat(base_path)
if d_st then
  for f in posix.files(base_path) do
    path = base_path..f
    st = posix.stat(path)
    if st and st.type == "link" then
      os.remove(path)
    end
  end
end