]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: simplify the regex for matching npm command
authorKefu Chai <kchai@redhat.com>
Wed, 21 Jul 2021 02:05:53 +0000 (10:05 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 22 Jul 2021 08:35:40 +0000 (16:35 +0800)
npx command was added in 3fe39d4899f909d4db8bb3fbc1de5367b280620d,
but we don't use npx anymore, so drop it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/dashboard/frontend/CMakeLists.txt

index 48ef908f0e115d2f05fe8deb1154f015d904d6e7..3d9995b7c5d4b8335c69a9df309f871d5bf2dc7a 100644 (file)
@@ -6,7 +6,7 @@ function(add_npm_command)
   cmake_parse_arguments(NC "${options}" "${single_kw}" "${multi_kw}" ${ARGN})
   string(REPLACE ";" " " command "${NC_COMMAND}")
   if(NC_NODEENV)
-    string(REGEX REPLACE "^(.*(npm|npx) .*)$" ". ${mgr-dashboard-nodeenv-dir}/bin/activate && \\1 && deactivate" command ${command})
+    string(REGEX REPLACE "^(.*npm .*)$" ". ${mgr-dashboard-nodeenv-dir}/bin/activate && \\1 && deactivate" command ${command})
   endif()
   string(REPLACE " " ";" command "${command}")
   add_custom_command(