Skip to content

Commit

Permalink
Fixed path validation
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianRappl committed May 22, 2022
1 parent 0b8df16 commit 248d227
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scaffold/ScaffoldView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const SecondPage: React.FC<PageProps> = ({ onPrevious, onNext }) => {
const options = state.options;

const { repoType, template, name, targetFolder, version, piralPackage, npmRegistry, nodeModules } = options;
const valid = useMemo(() => /(\/[A-Za-z_\/-\s0-9\.]+)+$/.exec(targetFolder), [targetFolder]);
const valid = useMemo(() => /^[^<>"|?*]+$/.exec(targetFolder), [targetFolder]);
const canScaffold = valid && repoType !== '' && template !== '' && name !== '';

const openLocalPathModal = () => actions.selectLocalPath();
Expand Down

0 comments on commit 248d227

Please sign in to comment.