Skip to content

Commit fdb7f68

Browse files
committed
Introduce --skip-profile-pictures
1 parent 956b26f commit fdb7f68

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

commands/transform.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func init() {
4444
TransformSlackCmd.Flags().BoolP("skip-convert-posts", "c", false, "Skips converting mentions and post markup. Only for testing purposes")
4545
TransformSlackCmd.Flags().BoolP("skip-attachments", "a", false, "Skips copying the attachments from the import file")
4646
TransformSlackCmd.Flags().Bool("skip-empty-emails", false, "Ignore empty email addresses from the import file. Note that this results in invalid data.")
47+
TransformSlackCmd.Flags().Bool("skip-profile-pictures", false, "Skips copying the profile pictures from the import file")
4748
TransformSlackCmd.Flags().String("default-email-domain", "", "If this flag is provided: When a user's email address is empty, the output's email address will be generated from their username and the provided domain.")
4849
TransformSlackCmd.Flags().BoolP("allow-download", "l", false, "Allows downloading the attachments for the import file")
4950
TransformSlackCmd.Flags().BoolP("discard-invalid-props", "p", false, "Skips converting posts with invalid props instead discarding the props themselves")
@@ -65,6 +66,7 @@ func transformSlackCmdF(cmd *cobra.Command, args []string) error {
6566
attachmentsDir, _ := cmd.Flags().GetString("attachments-dir")
6667
skipConvertPosts, _ := cmd.Flags().GetBool("skip-convert-posts")
6768
skipAttachments, _ := cmd.Flags().GetBool("skip-attachments")
69+
skipProfilePictures, _ := cmd.Flags().GetBool("skip-profile-pictures")
6870
skipEmptyEmails, _ := cmd.Flags().GetBool("skip-empty-emails")
6971
defaultEmailDomain, _ := cmd.Flags().GetString("default-email-domain")
7072
allowDownload, _ := cmd.Flags().GetBool("allow-download")
@@ -94,7 +96,7 @@ func transformSlackCmdF(cmd *cobra.Command, args []string) error {
9496
}
9597

9698
profilePicturesDir := path.Join(attachmentsDir, "profile_pictures")
97-
if !skipAttachments {
99+
if !skipProfilePictures {
98100
if fileInfo, err := os.Stat(profilePicturesDir); os.IsNotExist(err) {
99101
if createErr := os.MkdirAll(profilePicturesDir, 0755); createErr != nil {
100102
return createErr

0 commit comments

Comments
 (0)